Bayern Munich also progressed, beating Roma 2-0 to maintain its perfect record, while Porto won by the same scoreline at Athletic Bilbao to join the Bundesliga club in the last 16.
"Messi is absolutely the best player I have ever seen as player or coach," said Barcelona coach Luis Enrique.
It was a miserable night for English sides with nine-man Manchester City losing 2-1 at home to CSKA Moscow to slip to the bottom of Group E and Chelsea missing a penalty in a 1-1 draw at Maribor in Group G.
Sporting Lisbon blew that group wide open as it came from behind to beat Schalke 4-2, while Luiz Adriano scored a second-half hat trick to help Shakhtar Donetsk humiliate BATE Borisov 5-0 and stay second behind Porto in Group H.
Messi scored his 70th Champions League goal in the 36th minute with a soft header after Ajax failed to clear a free kick and then linked up with substitute Pedro Rodriguez for his second of the night in the 76th.
Ajax played the last 20 minutes with 10 men after defender Joel Veltman was sent off for his second yellow card.
PSG beat Apoel Nicosia 1-0 to remain a point ahead of Barcelona, with Edinson Cavani scoring the only goal of a scrappy game after just 57 seconds.
Manchester City is on the verge of tumbling out of the group stage following two goals from Seydou Doumbia either side of a Yaya Toure free kick.
City's halftime substitute Fernandinho was sent off in the 70th for two bookable offences, and Toure followed for pushing Roman Eremenko.
"It's very difficult to understand why we played so badly," City coach Manuel Pellegrini said. "Really, we didn't play. The first half especially, we didn't see the team we normally see."
City is two points behind CSKA and Roma.
The Italian team was keen to avoid a repetition of its 7-1 mauling at the hands of Bayern last time out and managed to restrict the five-time champion to two goals, by Franck Ribery and Mario Goetze, either side of halftime.
Maribor was unrecognizable from the side crushed 6-0 by Chelsea two weeks ago and claimed a deserved lead when Agim Ibraimi curled a beautiful shot into the top corner five minutes into the second half.
Nemanja Matic levelled from close range 17 minutes from time and Chelsea had the chance to take all three points when Eden Hazard was fouled for an 85th minute spot-kick, but the Belgian's effort was too central and Jasmin Handanovic saved.
Chelsea still leads Group G with eight points, three ahead of Schalke, with Sporting a point further back following its first win of the tournament this season. Maribor has three points.
Islam Slimani's 17th-minute own goal from a deflection handed Schalke the lead, but Sporting equalized just under 10 minutes later through Naby Sarr's glancing header.
Goals from Jefferson and Nani put Sporting in front and, although Dennis Aogo pulled one back two minutes from time, Slimani sealed it in stoppage time.
In Bilbao, Porto forward Yacine Brahimi atoned for his first-half penalty miss with an exquisite solo effort to set up Jackson Martinez for the 56th minute opener. Brahimi then sealed the win with the easiest of goals after a gaffe by goalkeeper Gorka Iraizoz.
As well as taking his tally to nine Champions League goals this season, Luiz Adriano also set up both of Shakhtar's other goals for captain Darijo Srna and Alex Teixeira.
BATE right-back Anri Khagush was sent off after the halftime whistle had gone, earning a second yellow card in less than a minute for arguing with the referee.