John Torres, 33, of York, was also charged with aggravated assault for the incident Tuesday afternoon in the area of 333 Brentwood Drive in the York Apartments, according to York Area Regional police.
Police said the victim, 34-year-old David Hohman Sr. of Baltimore, sustained several gunshot wounds to his upper body and arm.
He was transported to York Hospital for treatment of non-life threatening wounds and was listed in stable condition.
Police said the incident appears to be the result of a dispute between Torres and Hohman.
Officers who responded to the incident at around 12:30 p.m. found Hohman sitting in a vehicle.
Police said Torres was among those who called 911 and waited for police to arrive.