“Today at dawn, ex-supreme judge Cesar Hinostroza was captured by Spanish police and Interpol Peru,” Vizcarra said on Twitter.
Spanish police in Madrid confirmed Hinostroza's arrest to AFP and said he would be brought before a court for extradition proceedings.
Vizcarra had sent a request to Spain on Thursday to arrest and extradite Hinostroza, who is accused of being the ringleader in a scandal involving influence peddling and the sale of lighter sentences.
The scandal came to light in July after local media published tapes containing compromising telephone conversations. In one of them, Hinostrroza can allegedly be heard offering someone found guilty of raping a minor either a reduced sentence or even an acquittal.
A Spanish foreign ministry source confirmed on Thursday that Hinostroza had entered Spain the day before.
On Wednesday, Peru's interior minister, Mauro Medina, resigned after it was revealed that Hinostroza had slipped over the border into Ecuador and boarded a flight to Madrid, via Amsterdam.
Authorities prevented his 16-year-old daughter from travelling to Madrid but his wife, Gloria Gutierrez Chapa, has been in the Spanish capital since October 11, according to local press.
Hinostroza, 62, was sacked by Congress a fortnight ago and is the central figure in a scandal that has sparked street protests and led Vizcarra to promise sweeping judicial reforms.
Vizcarra has accused Hinostroza of leading a “criminal organization” while the Peruvian government offered a reward of 40,000 soles ($12,000) for his capture — he escaped 12 days ago with the help of an immigration inspector.
The president told RPP channel he had spoken with Spanish counterpart, Pedro Sanchez, by telephone. He also hit out at Hinostroza for claiming asylum in Spain, insisting the case was “strictly judicial, the battle against corruption.”
For days the ex-judge's lawyer denied Hinostroza was on the run, right up until his presence in Madrid was confirmed on Wednesday.
Since the audio recordings, originally made by police tracking a drug-trafficking ring in Callao, Peru's main port, near Lima, came to light, several top officials have either resigned or been sacked.
Supreme Court president Duberli Rodriguez resigned while Justice Minister Salvador Heresi was sacked.
By AFP's Francisco Jara