Heinze headed home a Juan Sebastian Veron corner as early as the sixth minute but it was Messi who took centre stage with his jinking runs and fiery shooting.
He had a superb chip tipped over by Nigerian goalkeeper Vincent Enyeama for the corner, taken by Juan Sebastian Veron, from which left back Heinze put Argentina ahead with a diving header into the roof of the net from close to the penalty spot.
Midway through the first half, in a trademark cut inside from the right, the little ace shot to the far low corner only for Enyeama to dive and turn the ball away.
Messi threatened again near the end of the half, curling a lovely shot towards Enyeama's top right corner with the keeper leaping to tip the ball wide.
Argentina's coach Diego Maradona attracted almost as much attention from the cameras, spending the entire game ranting and raving on the sidelines.
Nigeria also had chances with striker Chinedu Obasi going close with the match less than two minutes old after one of a string of errors in defence by right wing-back Jonas Gutierrez.
Obasi again threatened close to the half hour, shooting low across the goal with keeper Sergio Romero rooted to the spot and Yakubu Aiyegbeni failing to make contact in the middle.
Nigeria sought to hit Argentina with quick counter-attacks profitting from erratic passing by the South Americans.
With 20 minutes to go left back Taye Taiwo hit a low shot from outside the box that beat Romero but went just wide of the far post.
Argentina join South Korea, who beat Greece 2-0 earlier in Port Elizabeth, on three points at the top of the group.
Rooney edges Ronaldo for place in WC Dream Team
Group B 23-man squads
Maxi brace helps Argentina maul Canada 5-0 in WC friendly
Heinze signs for Man Utd
Messi scrape has Argentina worried