The trip will include stops in Madrid, Barcelona and the Canary Islands of Gran Canaria and Tenerife, as listed in the June 6-12 itinerary published by the Spanish Bishops' Conference and the Vatican.
The head of the Roman Catholic Church plans to meet Spanish King Felipe VI and Prime Minister Pedro Sánchez.
Visits to prison inmates and migrants are also planned.
In Madrid, the Pope is due to visit the Royal Palace and a Caritas homeless shelter on the first day.
In the evening, he will meet with thousands of young people.
Leo XIV will also celebrate Mass in Cibeles Square in Madrid on June 7.
The program calls for him to meet Sánchez the following day, when the pontiff is also scheduled to deliver a speech in parliament and lead a diocesan meeting at the Santiago Bernabéu Stadium.
The visit will then continue in Barcelona, where Leo is scheduled to hold a prayer vigil at the Lluís Companys Olympic Stadium on June 9, visit Brians 1 prison and celebrate Mass at the Sagrada Família on June 10.
At the basilica, he will also consecrate the newly completed Jesus Tower, coinciding with the 100th anniversary of the death of its famed architect Antoni Gaudí.
The final leg of the trip will take the Pope to the Canary Islands, where meetings with migrants and two further Masses are planned on Gran Canaria and Tenerife.
The visit will be the first by a pontiff to Spain since Benedict XVI attended World Youth Day in Madrid in August 2011.
The Pope is also likely to visit France in September, the country's bishops announced in a statement on Wednesday.
"In the proposed program, Pope Leo XIV could go to Paris and Lourdes," the French bishops' conference said in the release, which also asked Catholics to pray in preparation for the pontiff's visit.
It is unusual for local bishops to announce a papal visit, which the Vatican usually announces.
The Vatican's press office did not immediately respond to a request for comment.
Leo, the first US pontiff, has undertaken three trips outside Italy since becoming the leader of the Church a year ago.