Mr Ruto and his family were not at the compound near the western city of Eldoret at the time.
Specialist troops had been deployed to deal with the intruder, who was hiding in a partially-constructed building, police said.
Earlier reports suggested a number of gunmen had entered Mr Ruto's home.
"In circumstances that are yet unclear, he hit an officer on duty with a machete and managed to enter the farm complex," National Police Inspector General Joseph Boinnet said in a statement.
Mr Ruto's home in Sugoi village near the city of Eldoret
There were also reports of gunfire. The wounded police officer was in a stable condition, police said.
The incident comes 10 days before Kenya holds presidential, legislative and regional elections.
The deputy president had left hours earlier for a campaign rally in the town of Kitale, where he joined President Uhuru Kenyatta.
Mr Kenyatta is seeking re-election next month.
While Kenya's 2013 elections passed relatively peacefully, there was serious post-election violence following the 2007 polls, which left more than 1,000 people dead and 600,000 displaced from their homes.
However, experts say they do not expect to see the same level of conflict following the 8 August vote.