The White House announced yesterday that the three-country trip is booked for June 27-July 1.
Her travelling companions are daughters Malia and Sasha, and her mother, Marian Robinson.
Actresses Freida Pinto and Meryl Streep are lending their star-power to the first lady's Africa appearances.
In Liberia, Obama is scheduled to visit a Peace Corps training facility in Kakata to meet with girls and young women participating in an empowerment camp.
More From This Section
The first lady also plans to visit a school in Unification Town, Liberia, to speak with adolescent girls about their obstacles to getting an education. Pinto, an advocate for girls' education, will moderate the discussion.
Liberian President Ellen Johnson Sirleaf will join Obama during the visit.
Streep, also a girls' education advocate, is scheduled to accompany Obama in Marrakech, Morocco, for another conversation with adolescent girls that is to be moderated by CNN's Isha Sesay.
In Madrid, the first lady plans a speech on the Let Girls Learn initiative, launched in March 2015 to encourage developing nations to educate the more than 62 million girls worldwide who currently don't attend school.
Mrs Obama also plans to meet with Queen Letizia while she is in Spain.
With seven months left on the president's term, the upcoming visits to Africa and Europe could be the final foreign trip Obama takes without him.
Malia graduated from high school last week and is taking a "gap" year before enrolling in Harvard in the fall of 2017.
Students who take gap years typically travel and pursue other projects. Sasha will be on summer break before entering 10th grade this fall.
The first lady has promoted Let Girls Learn during stops in the partner countries of Japan, Cambodia, the United Kingdom and Qatar.