The 35-year-old, who has scored 111 international goals and has been named FIFA World Player of the Year six times, opened the scoring in the ninth minute before adding a second goal in the 74th minute.
Debinha, Andressa Alves and Beatriz scored the other goals as Brazil claimed victory in their Group F match in Rifu, Japan.
Marta’s brace means she now has 12 Olympic goals under her belt, having scored her first in Athens in 2004, and is now just a stone’s throw from the all-time record held by compatriot Cristiane .
She wasn’t the only Brazilian player to make history on Wednesday, as her 43-year-old teammate Formiga also made her own Olympic history.
The Sao Paolo midfielder, who has 201 caps for her national team, became the first female player to compete in seven Olympic Games after playing 72 minutes against China.
She made her Brazilian debut at the 1995 World Cup at the age of 17 and has competed in every Olympic Games since women’s football made its debut at the Atlanta Games in 1996.
After winning silver at the 2004 and 2008 Games, Formiga is finally looking to win that gold medal that has so far been elusive.
The 2016 Games, which were held at home, ended in grief for Formiga and her team-mates as they lost to Sweden on penalties in the semi-finals before losing the medal match bronze against Canada.