Jose Luis Rodriguez Zapatero, the Spanish prime minister, and main opposition leader Mariano Rajoy are due to take part in acts of remembrance.
Islamic extremists sympathetic to al-Qaida claimed responsibility for planting 10 bombs on four trains.
The blasts killed 191 people and injured about 1900 others.
Two children, one of Algerian origin, from San Ildefonso school will lay a wreath and flowers will also be laid at Atocha station, where the “trains of death” were headed.
The prime minister will pay his respects at the Madrid memorial to the victims, which Spain’s king and queen inaugurated last year in the capital’s Retiro park.
“One cannot forget what happened and one must remember to ensure it does not happen again”
Felix Herrero, Chairman of Spain’s Federation of Muslim Groups
It includes 192 cypress and olive trees – one for each of the victims and a police officer killed two weeks after the blasts when seven suspects blew themselves up as police prepared to raid their Madrid apartment.
Later in the day, Christians, Muslims and Jews are to join together for an ecumenical prayer service outside the station, praying together for peace.
Joining the national commemorations will be a group of community leaders and dignitaries from the Moroccan town of Nador, who set off on a peace caravan on 5 March for Madrid.
Also due to attend was Moroccan ambassador to Spain Omar Azziman.
Most of the suspects are Moroccan nationals and charges are soon due to be brought for a trial, set to last a year.
To date, only one person has been convicted over the attacks – a 16-year-old who in November 2004 pleaded guilty to transporting explosives stolen from a mine in northern Spain, and also to collaborating with a terrorist group.
Victims’ associations are due to keep a low profile amid their own private grief, as they did 12 months ago.
Spain’s Federation of Muslim Groups (FEERI) on Friday condemned terrorism and offered support for the families of the bomb victims.
“The second anniversary is a reason to show solidarity not so much with those who died, as Allah will be doing that, but with the families of the dead and the injured, said FEERI chairman Felix Herrero.
“We are at their side as they suffer. One cannot forget what happened and one must remember to ensure it does not happen again,” he added.