Judge Pablo Ruz at the National Court, in a written decision, refused to scrap the case despite a recent reform to restrict such human rights probes in Spain.
He also vowed to press on with two other investigations into alleged genocide in the former Spanish colony of Western Sahara from the 1970s.
Ruz opened the investigations under universal jurisdiction — a principle that allows judges to try certain atrocities committed in other countries.
Spain's parliament, dominated by the conservative ruling Popular Party, last month passed a government reform to restrict courts' powers to apply universal jurisdiction.
That reform came after a lawsuit alleging atrocities by Chinese leaders in Tibet, which annoyed China, a major trading partner of Spain.
Rights groups have criticized the reform, saying it puts economic and diplomatic interests before human rights.
The Spanish courts agreed in 2009 to probe charges brought by four ex-Guantanamo detainees who say they were tortured during their detention in the camp between 2002 and 2005.
Among those cited in the charges are Bush, US former vice president Dick Cheney and ex-defence secretary Donald Rumsfeld.
The new law says courts in Spain can only probe atrocities committed abroad if the suspects are Spanish.
But Ruz said in Tuesday's judgement that Spain had an "obligation" under international treaties to investigate alleged atrocities even if the suspects were not Spanish.
In one of the two other cases, plaintiffs accuse Moroccan authorities of genocide in Western Sahara, a disputed region annexed by Morocco in the late 1970s.
The third case alleges genocide in Western Sahara by the Polisario Front, a pro-independence force in the region.
Ruz said he could investigate those allegations on the grounds that Western Sahara was a Spanish territory at the time.
Morocco's annexation of Western Sahara was never recognized internationally.