The ceremony took place on a wide sandy ground where the stadium will be built.
It was the Argentine forward's first visit to Gabon and he signed autographs on team jerseys worn by his fans, before proceeding with the laying of the first stone, accompanied by the president.
"When I was in Barcelona a few years ago, I met Messi who had told me that he would come to visit me in Libreville," said the Gabon president.
"It's a promise he made me. He is a man of honour who just kept his word."
The new stadium will have a capacity of 20,000 and is expected to host matches from November 2016 in the build-up to the tournament.
Port Gentil is Gabon's second city.