Army Col. Myles B. Caggins III, military spokesman for Combined Joint Task Force -- Operation Inherent Resolve, said fire and rescue teams responded to the incident, which occurred at approximately 10:10 p.m. local time.
The teams "extinguished the fire and assisted in an evacuation of the plane," Caggins said in a statement. The cargo aircraft also sustained structural damage, he said.
"Four service members on the plane sustained non-life-threatening injuries and are being treated at Camp Taji's medical facility," Caggins added. "Enemy activity is not suspected."
The incident is under investigation.
The C-130 serves as the airlift workhorse of Operation Inherent Resolve, the Pentagon's name for the anti-Islamic State campaign, and has for many years of operations in the Middle East. As part of the campaign, the Air Force operates alongside Iraqi forces at the base, about 15 miles north of Baghdad.
Taji has been the target of periodic rocket attacks in recent months, most notably in March when three service members were killed, including two Americans.
The March 11 attack killed Army Spc. Juan Miguel Mendez Covarrubias, 27, of Hanford, California, and Air Force Staff Sgt. Marshal D. Roberts, 28, of Owasso, Oklahoma. British Royal Army Medical Corps Lance Cpl. Brodie Gillon, 26, also was killed in the attack.
Marine Gen. Frank McKenzie, head of U.S. Central Command, has blamed the attacks on the Iranian-backed Kata'ib Hezbollah militia.
-- Richard Sisk contributed to this report.
-- Oriana Pawlyk can be reached at firstname.lastname@example.org. Follow her on Twitter at @Oriana0214.