Bolt, 29, had won the 100m and 200m in Rio and is the only man to win all three sprint events at three Games.
Usain Bolt went on his knee, gave the track one final kiss, flattened his hand, then reached down and slapped the white number “3” painted at the starting line.
The relay which was his last race in the 2016 Rio Olympics ended with another Gold medal, making it his 9th Gold Olympic medal on Friday night.
He combined with Asafa Powell, Yohan Blake and Nickel Ashmeade to lift gold in a time of 37.27 seconds.
Japan won a surprise silver and the USA were disqualified to hand Canada bronze and lift Britain up to fifth.
After the race he said: “There you go, I am the greatest.”