Farah became the first man since Finnish great Lasse Viren in 1976 to retain two Olympic distance titles after storming to victory, a week after defending his 10,000m crown at Rio's Olympic Stadium.
The 33-year-old Somali-born Londoner again produced a superb tactical race on Saturday to outfox his rivals and take gold in 13min 3.30sec.
"Oh my God I can't believe it!" said Farah. "My legs were tired after the 10,000m and people had to bring me food in my room.
Centrowitz produced the biggest upset on the final night of track competition, beating defending champion Taoufik Makhloufi of Algeria into second place to win gold in 3min 50.00sec.
Also Read
Centrowitz became the first American man in more than a century to win the event, which has been shared exclusively between African runners since 1996.
"There's nothing like it. It doesn't compare to anything else I've won in my life," said Centrowitz. "Doing my victory lap, I literally kept screaming to everyone I know 'Are you kidding me?'"
New Zealand's Nicholas Willis took the bronze medal in 3:50.24.
Centrowitz's win was one of three golds won by the United States, who also took the 4x400m relays.
- Golden finish for Felix -
===========================
US track golden girl Allyson Felix led home her team in the women's 4x400m, crossing the line in 3min 19.06sec to claim a record sixth gold medal.
relay gold, has now won more track gold medals than any other woman athlete in history.
"I can look back at the things I've accomplished and be really proud," Felix said. "It was a good night."
In the men's 4x400m, former Olympic 400m champion LaShwan Merritt led the US team home in 2:57.30 with Jamaica finishing in silver and defending champion the Bahamas bronze in 2:58.49.
South Africa's Caster Semenya completed a convincing victory in the 800m to win her first Olympic gold in 1:55.28.
Francine Niyonsaba of Burundi took silver in 1:56.49 with Kenya's Margaret Wambui claiming bronze in 1:56.89.
She has dominated the event since a sports court last year judged that an International International Association of Athletics Federations (IAAF) regulation limiting competitive testosterone levels was unlawful.
Shortly before Saturday's final, IAAF chief Sebastian Coe said the world body would seek to revisit the question with the Court of Arbitration for Sport.
Semenya would not be drawn on the controversy.
"We're not here to talk about the IAAF," she said. "We're not here to talk about speculations.
The other big winner Saturday was Spain's veteran high jumper Ruth Beitia, who scored the biggest win of her 20-year career with a gold.
The 37-year-old became the oldest woman to win an Olympic jumping event after clearing 1.97m. Beitia won on countback from Mirela Demireva of Bulgaria and Blanka Vlasic of Croatia.
The javelin was won by Germany's Thomas Rohler with a 90.30m throw. Kenya's reigning world champion Julius Yego won silver with 88.24m while defending Olympic champion Keshorn Walcott of Trinidad and Tobago claimed bronze with 85.83m.