He was born in Coffeeville, Mississippi on 29 February 1944 to James Forrest Pittman and his wife Antoinette as James Forrest Pittman Jr. His father was serving as a paratrooper in the 101st Airborne Division at the time of his birth. In 1952 Forrest Pittman abandoned his wife and their 4 children who subsequently moved to Gulfport, Mississippi. His mother remarried George Lewis in 1959 and James was adopted by his stepfather as James Foley Lewis.
Due to his experience in covert paramilitary operations, Lewis was recruited into the CIA in 1970. In April 1975 Lewis was serving as an adviser to the Army of the Republic of Vietnam with his cover being as a consular officer at Nha Trang. As the People's Army of Vietnamoffensive drew closer, he was captured together with ARVN Lieutenant General Nguyễn Vĩnh Nghi near Phan Rang Air Base on 16 April 1975. He was then transported north to Sơn Tây prison camp where he underwent repeated interrogation, sleep deprivation and malnutrition. He was initially the only prisoner, being joined several months later by 13 others including Paul Struharik, an AID official captured at Ban Me Thuot, Australian journalist Peter Whitlock, graduate student Jay Scarborough and missionaries John and Carolyn Miller and their 6 year old daughter Luanne. On 30 October 1975 Lewis and the other prisoners were transported by a UN-chartered C-47 to Vientiane, Laos and then on to Bangkok, Thailand. As author Kai Bird notes, he was "the last American prisoner of war to come home." Following his return from Vietnam, Lewis attended George Washington University where he studied French literature, graduating with a bachelor's degree in 1977. During this time he met Monique Nuet, a Vietnamese-born pharmacologist and they were married in 1977. In 1979 Lewis undertook Arabic language training in preparation for assignment to the Middle East. He was first assigned to Tunis and was then transferred to Beirut on temporary assignment on 13 August 1982. Lewis was appointed as Deputy Station Chief while his wife Monique gained security clearance and was due to start work as a CIA secretary on 18 April 1983. He was killed on 18 April 1983 when a suicide bomber detonated a bomb at the US Embassy in Beirut. A total of 63 people were killed in the explosion including his wife Monique, Robert Ames, Kenneth E. Haas and thirteen other Americans. He was buried at Arlington National Cemetery with his wife Monique. He and his wife were only acknowledged as CIA employees in 2012, they are memorialized on the CIA Memorial Wall.