Police say Jason Shauf and Carl Varner, both of Chambersburg, have been charged with first and second degree murder, robbery and burglary.
The shooting happened in the 300-block of East King Street on Monday night.
Police say Shauf and Varner came into the home armed and demanded money and property.
One of the men fired a round of shots into the ceiling of the bedroom. The other suspect shot the victim who was found dead by police in the bathroom.
After swat officers surrounded Shauf's home on Sollenberger Road for nine hours on Tuesday, they then arrested him.
Varner was later arrested at his home.
Police have not released the identity of the victim, but say he is of Hispanic descent.
Varner and Shauf are being held at the Franklin County Jail awaiting a preliminary hearing.