Mohamed al-Magariaf's residence in Sabha, 800km south of the capital Tripoli, came under gunfire on Thursday evening (local time).
"(He) was unharmed and escaped the attack but three of his guards were injured," spokesman Rasmy Burwein said.
Magariaf was in Sabha for meetings with local officials and community leaders after Tripoli declared the region a closed military zone to try to curb rampant lawlessness.
Sabha and the rest of the Saharan south has been plagued by tribal violence since the start of the armed uprising in 2011 that ousted and killed veteran dictator Muammar Gaddafi.
Tribal power is much stronger in the south than on the Mediterranean coast. Porous borders with neighbouring states and the easy availability of arms have turned the south into a security headache for a weak central government.
It is still struggling to curb a myriad of armed militias that emerged powerful from the anti-Gaddafi insurgency.