Kearns has been brought back to London Road early, having been scheduled to remain with the Minstermen until January.
The 21-year-old will be available for Posh's Championship fixture at home to Blackpool on Saturday.
Kearns has impressed during his time at York, making 12 league and cup appearances since joining the League Two club at the start of October.
Darren Ferguson said: "I rate Danny, but we had to let him go out and get some games under his belt. He's done that and he's been York's best player so I felt it was the right time for him to come back.
"He's a good footballer, he moves well and passes the ball well so he will suit the way we are trying to play."