On February 18, 1853, Maximilian helped save the life of the young Emperor, foiling an assassination attempt by a tailor János Libényi, who was a nationalist from Hungary. The Emperor was taking a stroll with Count Maximilian O’Donnell on a city-bastion, when Libényi approached him. Libényi immediately struck the Emperor from behind with a knife straight at the neck. Even though the Emperor was wounded and bleeding, his collar may have helped save his life. Count Maximilian O'Donnell struck Libényi down with his sabre
Another witness who happened to be nearby, the butcher Joseph Ettenreich, quickly overwhelmed Libényi. For his deed he was later elevated to nobility by the Emperor and became Joseph von Ettenreich. Libényi was subsequently put on trial and condemned to death for attempted regicide. He was executed on the Simmeringer Haide. {Left-painting of Attempt on Franz Joseph-painting by J. Reiner}
After the unsuccessful attack the Emperor's brother Ferdinand Maximilian Joseph, the later Emperor of Mexico, called upon the Europe's Royal families for donations to a new church on the site of the attack. The church was to be a Votivgabe (a thank-you present to God) for the rescue of the Emperor. It is located on Ringstraße in the district of Alsergrund close to the University of Vienna, and is known as the Votivkirche.
Maximilian was also honoured with orders of chivalry by several European monarchs, and made a Freeman of the cities of Vienna, Prague, Pest, Laibach, and others. He was also conferred with the Commander's Cross of the Royal Order of Leopold, and his customary O'Donnell arms were augmented by the initials and shield of the ducal House of Austria, with additionally the double-headed eagle of the Empire. These arms can still be seen emblazoned on the portico of no. 2 Mirabel Platz in Salzburg, where O'Donnell built his residence thereafter in the former gardens of Schloss Mirabell.