Cameron is scheduled to meet his Libyan counterpart Ali Zeidan, and then expected to hold a joint news conference, which is expected to touch upon the threat of Islamist militancy across the region.
"The prime minister landed in Tripoli earlier on Thursday, and will discuss bilateral relations with Libyan officials," a spokeswoman for his Downing Street office said.
Cameron met Ashour Shuail, the Libyan interior minister, and visited a police training academy on Thursday morning.
The British premier visited Libya in 2011 along with then French President Nicolas Sarkozy after rebels ousted former Libyan leader Muammar Gaddafi with French, British and U.S. backing.
Libya's nascent institutions have since struggled to rein in armed groups, and the country's second city of Benghazi has in particular experienced a wave of violence in recent months.
Oil producer Libya is keen to attract foreign funds and expertise after years of chronic under-investment under Gaddafi, and officials were last week irked when Britain issued a warning urging its citizens to leave Benghazi due to an unspecified "specific, imminent" threat.