A government statement said Moussa Ibrahim was arrested at a checkpoint in the north central town of Tarhuna and will be delivered to authorities in Tripoli for questioning.
Ibrahim was Gadhafi's spokesman during Libya's 2011 civil war. His whereabouts have not been known since the fall of Tripoli in August of that year.
Moammar Gadhafi died on October 20, 2011, after his convoy of supporters trying to flee the city of Sirte was hit by an airstrike and attacked by militia members.
Hours after Ibrahim's arrest announcement, a recording on the former spokesman's Facebook page dismissed government accounts of the detention. The recording, which had not been authenticated, said Ibrahim was free and residing outside the country.
Reports of Ibrahim's arrest came as authorities said Libya was still not free of Gadhafi's four-decade legacy, and warned that the dictator's loyalists still pose a threat to stability in the war-torn country.
Speaking late Friday on Libyan television, National Assembly President Mohammed el-Magarief singled out the Gadhafi stronghold of Bani Walid, controlled by the powerful Warfalla tribe. VoA.