Haftar's self-styled Libyan National Army (LNA) said the talks, which also focused on efforts to organise elections in Libya, were held at the strongman's headquarters in a southeastern suburb of Benghazi.
The two men "had a long and cordial conversation which relaunched close relations with Italy, in a climate of consolidated trust," the Italian foreign ministry said in a statement.
Italy, a key supporter of the UN-backed government of Fayez al-Sarraj in Tripoli, wants to "maintain an active dialogue" with all well-intentioned actors in Libya, Milanesi said.
"The current political path must be completed, in particular through free and fair elections, held under adequate security conditions," he added, after France pushed for elections before the end of the year.
The ministry said Haftar "expressed his appreciation for Italy's foreign policy, which Libya can't do without."
"Marshal Haftar added that he was ready to contribute to actively support security, stabilisation and dialogue in the country, for the good of all Libyans," the ministry said, without elaborating.
The LNA, in a statement, said the two men discussed "the upcoming Libyan elections and ways of guaranteeing their transparency". Italy "pledged to back any UN proposal that would guarantee the stability
of Libya", the statement added.
The Libyan capital has been at the centre of a battle for influence between armed groups since dictator Moamer Kadhafi was driven from power and killed in a 2011 NATO-backed uprising.
Sarraj's Government of National Accord has been unable to form a functioning army or regular security forces and has been forced to rely on militias to keep Tripoli safe. Militias formed the backbone of the uprising that toppled Kadhafi.
Since then rival administrations, including one allied with Haftar and based in the remote east, and the militias have competed for authority and oil wealth in the North African country.
Accused by his opponents of wanting to establish a new military dictatorship, Haftar refuses to recognise the authority of Sarraj's Tripoli-based GNA.