Barcelona striker Messi's victory was a surprise as he edged out Virgil Van Dijk, who won the UEFA player's award last month after helping Liverpool to the Champions League last season.
Juventus forward Ronaldo had also been shortlisted for the award, but did not attend the ceremony as he was named in FIFA's World 11 best team along with Messi.
Both Messi, 32, and Van Dijk, 28, are now in the running for the coveted Ballon d'Or which will be announced on December 2.
"I want to thank those who decided to give me this recognition," said Messi.
|Lionel Messi (AFP)|
"The most important thing for me is the collective awards, but today is also a very special night for me."
It is the first time that Messi has won the FIFA Best Award which was created in 2016. Ronaldo won for 2016 and 2017, with Croatian Luka Modric beating both last year.
Messi was top scorer in the Champions League last season with 12 goals before Barcelona were dumped out by Liverpool in the semi-finals.
The Argentine also won the European Golden Shoe after scoring 36 goals, the La Liga title with Barcelona and helped Argentina to bronze at 2019 Copa America.
Van Dijk had been bidding to become a rare defender to win a FIFA player award, since Italian Fabio Cannavaro won the World Player of the Year, and he Ballon d'Or in 2006.
The Netherlands captain also missed out on completing a treble for Liverpool with manager Jurgen Klopp winning the men's coach of the year award and Alisson Becker the goalkeeper prize.
- Rapinoe 'lost for words' -
Megan Rapinoe beat fellow World Cup winner Alex Morgan and England's Lucy Bronze to the women's prize, with her USA coach Jill Ellis lifting the women's coaching award.
Rapinoe, 34, was joint top scorer with six goals at the women's World Cup and won the Golden Boot, also gaining the Golden Ball for the best player and becoming the face of the tournament for her outspoken views on US president Donald Trump and campaigning for LGBT rights.
"I'm a little bit at a loss for words, if you can believe it, it rarely happens to me," said Rapinoe who went on to make a plea against racism and for women's rights.
"We have such an incredible opportunity being professional football players.
"We have incredible platforms, the unique opportunity to use this to actually change the world for the better."
Klopp won the men's coaching award ahead of two other Premier League coaches -- Tottenham's Mauricio Pochettino, who the German beat in June's Champions League final, and Manchester City's Pep Guardiola.
"It is great, nobody expected this 20, 10, five, four years ago that I would be standing here," said the 52-year-old German who joined Liverpool in 2015.
"I have to say thank you to my outstanding club Liverpool FC. Those who don't love it don't have a heart.
"As a coach you can only be as good as your team. I'm really proud of being coach of such an incredible bunch of players."
Two-time women's World Cup-winning coach Ellis, beat Dutch coach Sarina Wiegman, runner-up in France 2019, and England's Phil Neville for the award.
"The World Cup really was a showcase, the world fell even more in love with the game," said 53-year-old Ellis, who will step down from the team in October.
Leeds United manager Marcelo Bielsa won the fair play award after he ordered his team to allow Aston Villa to score an equaliser during their 1-1 draw in their Championship match in April.
Bielsa's side had gone ahead controversially when a player was injured before the Argentine intervened.
Romanian-born Hungarian forward Daniel Zsori won the Fifa Puskas Award for the best goal, beating strikes from Messi and Juan Fernando Quintero.
The 18-year-old forward, on his debut, scored a spectacular overhead kick to win the game for his side Debrecen against Ferencvaros in stoppage time. (AFP)