Usain Bolt's not going out with a bang ... the legendary sprinter just lost his final 100m race.

Bolt ended his individual track career with the bronze in the men's 100m sprint at the World Athletic Championships in London ... losing to longtime rival Justin Gatlin and another American, Christian Coleman.

The race had a photo finish, but in the end Bolt's 9.95 seconds was .03 seconds slower than Gatlin, who took home the gold. Coleman's time was 9.94.

For Gatlin, it's been a long time coming -- he guaranteed he would beat Bolt back in the 2016 Olympics ... and we know how that turned out.

As for Usain ... the "Fastest Man Alive" still holds the world record in the event at 9.58 seconds and won 3 straight Olympic golds in the 100m and 200m.

He still has one last chance to go out on top too -- he'll compete in his final 4x100m relay race with Jamaica next Saturday.