Police responded at 4:56 a.m. to a house in the 300 block of North Second Street, Dixon police Officer Ronnie Sefried said.
The resident told officers that four people dressed in dark clothing and wearing masks had tried to get inside the home.
Two were armed with an unknown type of long gun, Sefried said.
The resident sprayed the would-be intruders with pepper spray, and they fled in a car, Sefried said. The resident was not injured.
The motive for the burglary attempt is unknown, and the incident is still under investigation, Sefried said.
Anyone who witnessed the incident or has information about it is asked to call Dixon police at (707) 678-7070 or police dispatch at (707) 678-7080.