Both candidates are awaiting the final tally from the June 14 presidential run-off. A preliminary count released by the Independent Election Commission on Monday showed Ghani with a slight lead over Abdullah. Abudllah has repeatedly questioned the legitimacy of the election and alleged fraud.
In a Twitter message accompanying photos of him with Abdullah and Ghani on Friday, Kerry wrote that it's "Important that outcome of election is capable of unifying all."
Prior to his meetings with Abdullah and Ghani, Kerry spoke about the importance of legitimacy and unity.
"It is important that whoever is president is recognized by the people as having become president through a legitimate process, and that a government be one that can unify the people and lead into the future.
"The results that were announced on Monday are preliminary; they are neither authoritative nor final..."
Kerry cautioned during a joint press appearance with Abdullah, who earlier in the week challenged the veracity of the preliminary election results, that "no one should be stating a victory at this point in time."
Speaking alongside Ghani, Kerry expressed "high hopes that the questions about the election will be resolved quickly, can be resolved, and that a way forward can take place which can give Afghans confidence that they have a presidency and a government that is capable of unifying all Afghans and building a road to the future."
Final election results are expected July 22.
Kerry was also scheduled to meet with out-going President Hamid Karzai.