Oka, 20, claimed gold ahead of Chinese duo Zhang Boyeng in second, with Xiao Ruoteng claiming bronze as Hashimoto finished sixth.
In a gripping battle for gymnastics' most coveted title, less than a point split the top three going into the last of the six rotations - the horizontal bar.
With the Bercy Arena crowd holding their breath the last to go Zhang, who was set for bronze, produced a huge performance.
That left all eyes trained on the giant screen for his score to see if he had pulled gold out of the bag.
When it finally flashed up, Oka's face lit up as his internal calculator worked out he had held on by just 0.233 points.
Xiao, silver medalist behind Hashimoto at the Tokyo Games, was a further 0.468 points back.
Oka win gave Japan an unprecedented fourth consecutive men's all-around title after Hashimoto and Japanese icon Kohei Uchimura, the winner at London 2012 and four years later in Rio.
This was Oka's second gold in the space of 48 hours after he helped Japan to the team title at the Paris Games on Monday.