O’Dwyer studies at St. Nathys College, Ballaghaderreen, County Roscommon. He emigrates to the United States in 1910, after abandoning studies for the priesthood. He sails to New York City as a steerage passenger on board the liner Philadelphia and is inspected at Ellis Island on June 27, 1910. He first works as a laborer, then as a New York City police officer, while studying law at night at Fordham University Law School. He receives his degree in 1923 and then builds a successful practice before serving as a Kings County (Brooklyn) Court judge. He wins election as the Kings County District Attorney in November 1939 and his prosecution of the organized crime syndicate known as Murder, Inc. makes him a national celebrity.
After losing the mayoral election to Fiorello La Guardia in 1941, O’Dwyer joins the United States Army for World War II, achieving the rank of brigadier general as a member of the Allied Commission for Italy and executive director of the War Refugee Board, for which he receives the Legion of Merit. During that time, he is on leave from his elected position as district attorney and replaced by his chief assistant, Thomas Cradock Hughes, and is re-elected in November 1943.
In 1945, O’Dwyer receives the support of Tammany Hall leader Edward V. Loughlin, wins the Democratic nomination, and then easily wins the mayoral election. He establishes the Office of City Construction Coordinator, appointing Park Commissioner Robert Moses to the post, works to have the permanent home of the United Nations located in Manhattan, presides over the first billion-dollar New York City budget, creates a traffic department and raises the subway fare from five cents to ten cents. In 1948, he receives The Hundred Year Association of New York‘s Gold Medal Award “in recognition of outstanding contributions to the City of New York.” In 1948, he receives the epithets “Whirling Willie” and “Flip-Flop Willie” from U.S. Representative Vito Marcantonio of the opposition American Labor Party while the latter is campaigning for Henry A. Wallace.
Shortly after his re-election to the mayoralty in 1949, O’Dwyer is confronted with a police corruption scandal uncovered by the Kings County District Attorney, Miles McDonald. O’Dwyer resigns from office on August 31, 1950. Upon his resignation, he is given a ticker tape parade up Broadway‘s Canyon of Heroes in the borough of Manhattan. President Harry Truman appoints him U.S. Ambassador to Mexico. He returns to New York City in 1951 to answer questions concerning his association with organized crime figures and the accusations follow him for the rest of his life. He resigns as ambassador on December 6, 1952, but remains in Mexico until 1960.
O’Dwyer visits Israel for 34 days in 1951 on behalf of his Jewish constituents. Along with New York’s Jewish community, he helps organize the first Israel Day Parade.