The departure of Domenico Giani, 57, came after a Vatican police flyer identifying five Vatican employees who were “preventively suspended” as part of the financial probe was published by Italian newsweekly L'Espresso and its daily newspaper, La Repubblica.
The Vatican said the flyer harmed the employees' dignity and the Vatican gendarmes police.
Gianni had served three popes, including Pope Benedict XVI, in his 20 years with the Vatican security services. He could often be seen running alongside the "popemobile" during foreign trips and appearances.
"Having always said that I would be willing to sacrifice my life to defend the pope, I took the decision to resign with the same spirit, and to not in any way harm the image and activities of the pope," Giani told Vatican media.
The Oct. 2 flyer was sent to Swiss Guards and members of the gendarmes police force. The five individuals' faces, names and job titles were displayed on the flyer, which resembled a wanted poster.
Giani didn't take responsibility for the mishap but resigned to avoid disrupting the investigation and "out of love for the church and faithfulness" to the pope.
His agents raided two Holy See offices -- the secretariat of state and the Vatican's financial intelligence unit-- as part of a probe into financial irregularities concerning a London real estate deal which resulted in the loss of tens of millions of dollars.
The raids and suspension were part of efforts to recover some of the lost money. The deal has ignited questions about the Vatican's murky finances and financial mismanagement during Benedict's papacy.
Pope Francis recently ordered cuts to relieve a $77 million structural deficit. Sources told Reuters Francis was upset over the leak because the five employees had been represented in such a way even though they were not formally suspected of anything.
An investigation into the real estate deal was opened after the Vatican received complaints from the Vatican bank, known as the Institute for Works of Religion, and the auditor general's office against "unknown persons," Reuters reported.
The news agency reported the Secretariat of State had wished to buy a partner out of a London building they purchased years ago as an investment so it could gain full control over the property.
The secretariat asked the IOR for a short-term loan of around $165 million. The loan request was refused and the IOR and auditor general made complaints to the Vatican's chief prosecutor.
The Associated Press contributed to this report.