Mahoney was born in Bondi, and was educated at Marist Brothers' High School. He began working for the Postmaster-General's Department in 1925, working as a telephone mechanic and later as a divisional engineer. He was an alderman on the City of Parramatta council from 1954 until 1959, including a year as mayor in 1958. He was also a director of Parramatta District Hospital from 1956 until 1959. He was the Labor candidate at the 1958 Parramatta by-election, at which Sir Garfield Barwick entered politics, losing to the future Attorney-General and Chief Justice of the High Court.
Mahoney entered state politics at the 1959 election, when he won the state seat of Parramatta, which had been vacated by retiring Liberal MLA Jim Clough. He was easily re-elected on five occasions, always winning on the primary vote. Mahoney retired at the 1976 election, and was succeeded by Labor MLA Barry Wilde.
Mahoney served as a director of the Parramatta Leagues Club after his retirement from politics. He died at Port Macquarie in 1996.
The Dan Mahoney Reserve in North Parramatta is named for him. 
- "Mr Daniel John Mahoney". Former members of the Parliament of New South Wales. Retrieved 6 May 2019.
- Green, Antony. "Index to candidates". New South Wales Election Results 1856-2007. Parliament of New South Wales. Retrieved 6 May 2019.
- Barwick, Garfield (1996). A Radical Tory: Garfield Barwick's Reflections and Recollections. Federation Press. p. 107. ISBN 1-86287-236-8.
- "Dan Mahoney Reserve". City of Parramatta. Archived from the original on 10 June 2010. Retrieved 1 July 2010.