The game took place to raise money for the Paris and France Hospitals Foundation. Macron was up against a team made up of staff from the Poissy/Saint-Germain-en-Laye hospital.
Playing in midfield and wearing the number 3 on his back, he was handed the ball 10 minutes after the start of the match and invited to take a penalty shot after an opposing player brought down one of Macron's team-mates in the penalty box.
Macron, who is 43, fired his shot low and into the centre of the goal, wrong-footing the goal-keeper who had already started diving to his right. The goal-keeper managed to get a leg to the ball, but could not keep it out of the net.
The French president's goal brought the scores level at 1-1. His team later won the match 6-1, with Macron playing until the last few minutes of the second half.
His teammates included Arsene Wenger, former manager of English side Arsenal, and French former professional players Marcel Desailly and Christian Karembeu.