"I'm proud to say that this year, for the first time in history, we might just elect a president - a female president of the United States," she said, without naming presumptive Democratic White House nominee Hillary Clinton, Barack Obama's former rival who went on to become his secretary of state.
Her comments come as President Obama prepares to campaign with Clinton for the first time next Tuesday in the swing state of North Carolina, one of about a dozen battleground states where November's election is expected to be decided.
Michelle Obama, accompanied by her daughters Malia and Sasha and her mother Marian Robinson, arrived in the Spanish capital on Wednesday night from Morocco.
The US first lady and her daughters struggled to hold down their billowing dresses as they descended from their plane at Madrid's Torrejon air base.
The First Lady met Spain's Queen Letizia during her visit to Madrid. Photo: AFP
Spain was the last stop of a three-leg tour, which also included Liberia to promote her "Let Girls Learn" education initiative, which she launched in March 2015 to help teenage girls across the world access a quality education.
During her address to a group of young women and girls in Madrid, Michelle Obama said 62 million girls worldwide "can't develop their full potential because they don't have the chance to attend school."
"Now just imagine how that must feel. Imagine if, at the age of 10, or 11 or 12, someone came to you and said, 'Sorry, you're a girl, you're finished with your education. Forget about all your dreams. Instead you'll marry a man twice your age and start having babies'," she added.
Several members of the audience cried out "I love you" when she arrived at the cultural centre to give her speech accompanied by Spain's Queen Letizia, a former news reader who the US first lady described as a "dear friend".
While their mother gave the address, the Obama daughters hit the shops on Madrid's Gran Via.