Simone Biles was named Sportswoman of the Year for the third time after winning five gold medals at the gymnastics world championships in Stuttgart last year.
Hamilton won his sixth Formula One world championship last year, while Messi, who was not present at the awards ceremony, won his sixth Ballon d'Or.
It was the first time in the history of the awards, often seen as the Oscars of sport, that the Sportsman of the Year title has been shared.
"I grew up in a sport that has really given my life meaning," said Hamilton.
"I'm so, so grateful for what it has provided me. But I've actually grown up in a sport that has very little to no diversity.
"I think it's an issue that we're continually facing. It's all of our responsibility to use our platform for that, just that, really pushing for gender equality, gender inclusivity and really making sure that we're engaging and really trying to represent where the world is today."
The W Series -- an all-female motorsport championship -- was launched last year and won by British driver Jamie Chadwick.
Just six women have ever participated in an F1 Grand Prix weekend.
More recently, Colombian driver Tatiana Calderon has been a leading figure in women's motorsport having been retained as a test driver for Alfa Romeo and raced in the Formula 2 championship.
Hamilton is the third driver to win the Sportsman of the Year award after Michael Schumacher and Sebastian Vettel, while Messi is the first footballer.
America's Biles will be one of the standout athletes to watch at the upcoming Tokyo Olympics after winning four golds and a bronze at Rio 2016.
"It means the world to me," said 22-year-old Biles on receiving her honor.
"This is my third Laureus award so I'm truly grateful.
"I want to congratulate all the other nominees and I also want to (say) thank you to my family and friends for all their support over the years."
The South African rugby team, which won the World Cup last year, picked up the team of the year award, while Sophia Floersch, who returned to motorsport after suffering a horrific crash in 2018, won the comeback award.
- Lewis Hamilton calls for diversity and inclusivity after winning Laureus award
- The rise of diversity and inclusion jobs
- Lewis Hamilton calls plastic pollution 'disgusting' after beach clean up
- How to build a career in diversity and inclusion
- Lewis Hamilton apologizes for gender 'shaming' video
- Lewis Hamilton reflects on first world title
- Lewis Hamilton clarifies India 'poor place' comments
- Lewis Hamilton: 'Life is boring without challenges'
- Lewis Hamilton: I thrive facing adversity
- Lewis Hamilton 'redefining' Formula One