Donnelly attended Trenton public schools and the State Model School. He later attended the Episcopal School in Burlington, New Jersey, and studied at the Rider Business College (now Rider University). He worked for several years as a traveling salesman for a New York wholesale clothing business before returning to Trenton and assuming management of his father's clothing store.[3]
Donnelly became mayor in 1911 when the first city commission was organized. He was reelected every four years until 1931. The following year he resigned as mayor for health reasons and was succeeded by George B. Labarre.[1]
While mayor he advocated deeper waterways and served as president of the Trenton-Philadelphia-New York Deeper Waterways Association, which he organized. In 1924 he was the Democratic nominee for United States Senate, losing to the Republican incumbent, Walter Evans Edge.[1]