Born in Queensland, McNamara joined the RAAF during World War II and saw action in the South West Pacific, flying P-40 Kittyhawks. He also flew combat missions in Gloster Meteors during the Korean War. In 1961, he was awarded the Air Force Cross for his leadership of No. 2 Operational Conversion Unit. He gained further operational experience heading the RAAF presence in Ubon, Thailand, in the late 1960s. Promoted to air commodore, McNamara was Commander RAAF Forces Vietnam, and Deputy Commander Australian Forces Vietnam, in 1971–72, for which he was appointed a Commander of the Order of the British Empire. As Deputy Chief of the Air Staff in 1976, he was named an Officer of the Order of Australia. Knighted while CAS in 1980, he retired after completing his term as CDFS in 1984.