The man is expected to appear at Selkirk Sheriff Court.
The girl was reported missing in Galashiels on Sunday evening, prompting a large-scale search operation involving a police helicopter, mountain rescue teams, and specialist divers.
Members of the public also joined the emergency services in the search, which went on until Monday evening, with support also provided from the Scottish Fire and Rescue Service.
Chief Superintendent Catriona Paton, Lothians and Scottish Borders commander, said: “I want to thank the public for their huge effort and assistance during this incident. The people of Galashiels really came together and supported each other, the emergency services and search teams.
“We believe this incident to be contained and enquiries into the circumstances are ongoing.
“There will be increased high visibility patrols in the streets to provide reassurance and advice to the public, and anyone with concerns can speak to an officer at any time.”
Chief superintendent Paton had previously described the scale of the search as “a huge operation”.
The child had been last seen in Galashiels town centre around 5:45pm on Sunday and she was reported missing later that night.
In a statement issued on Tuesday afternoon, the force said the girl had been traced at a property in the Galashiels area the following evening.