Kerry said Friday shortly after arriving in Kabul overnight that Afghanistan is at a "very critical moment."
The top U.S. diplomat said the future potential of the transition "hangs in the balance, so we have a lot of work to do."
A State Department spokesman said Kerry will convey President Barack Obama's message that the U.S. expects a thorough review of all reasonable allegations of fraud and will not accept any extra-constitutional measures.
Kerry already has warned one of the candidates, Abdullah Abdullah, against using extra-legal means to grab power after his running mate talked about setting up a parallel government.
Abdullah and his rival Ashraf Ghani both claim victory in the June 14 runoff to replace outgoing President Hamid Karzai. Preliminary results show Abdullah trailing Ghani by about 1 million votes.
The United States says it does not take sides in the election, but does support a credible transparent process.