Jenson Button in action at the Daytona International Speedway track in Florida.
Button's Swiss team-mate Louis Deletraz crossed the chequered flag to secure a podium finish for Wayne Taylor Racing.
The 2009 Formula 1 world champion also shared driving duties with American pair Jordan Taylor and Colton Herta.
British pair Tom Blomqvist and Jack Aitken finished second with Whelen Engineering Cadillac Racing.
Their third team-mate for the endurance race was 2016 winner Pipo Derani of Brazil.
Fellow Brazilian Nasr, who raced in F1 for Sauber in 2015 and 2016, crossed the line first just two seconds ahead of Blomqvist, who won the race last year for Acura MSR.
Nasr's Porsche team-mates were Australian Matt Campbell and American pair Dane Cameron and Josef Newgarden.
Button, 44, retired from F1 in 2016, having contested 306 races across 18 years for seven teams, including his 2009 world title triumph with Brawn GP.
This year, he will drive the Jota Porsche 963 in the top hypercar class in the World Endurance Championship, which includes the 24 Hours of Le Mans race.
The Daytona 24 Hours, which began in 1962, takes in 791 laps of the Daytona International Speedway track in Florida.
-- Courtesy of BBC Sport