Specialist forces were deployed to find the intruder, who hid in an unfinished building, police chief Joseph Boinnet said in a statement.
Deputy President William Ruto was out with his family at the time of the attack in the western town of Eldoret. Ruto is the running mate of President Uhuru Kenyatta, who is seeking a second and final term in office in the Aug. 8 elections.
“In circumstances that are yet unclear, he hit an officer on duty … with a machete and managed to enter a farm complex,” Inspector General of Police Joseph Boinnet said in a statement, adding that officers were still trying to arrest the assailant.
“Other officers were quickly mobilised, and the intruder was forced to hide at a building that is still under construction next to the gate,” Boinnet said.
Local television stations had reported earlier that gunmen were behind the attack on Ruto’s home.
Kenya will hold legislative and regional county representative elections at the same time as the presidential vote.
Ruto and Kenyatta spent Saturday campaigning in the counties of Kitale, Kericho and Narok, the president’s office said in a statement.