Police say Spencer Newcomer IV admitted killing 47-year-old Dave Wintermyer to officers that responded to the scene Sunday morning.
Newcomer allegedly told officers Wintermyer had been "bugging" him for a long time.
Court documents say a witness told investigators the two men had been feuding for a long time over Newcomer's dogs and property. The dispute escalated as both men quarreled just after 9 a.m. outside their homes in Springettsbury Township, York County.
Authorities say Newcomer was among those who called 911 to report the shooting.
Newcomer is being held without bail at York County Prison. It wasn't immediately clear if he had an attorney.