Dwayne Tyson Magruder Jr. got into the home in the 1700 block of Art Drive on Wednesday by crawling through an unlocked window after Magruder's ex-girlfriend refused to let him in, police said.
Once inside, he cornered the woman and tried to take their child from her, police added.
He threatened her by saying, "I'll give the police a reason to lock me up by knocking out all your fronts," referring to her teeth, police said.
Magruder also hung up the house phone numerous times when she tried to call 911.
He ran from the home after a family member arrived after the woman was able to send a text, saying she needed help, a news release states.
West Manheim Police obtained a warrant for Magruder's arrest, and he was also wanted on two Carroll County, Md., warrants for probation violations related to theft and weapon charges, police said.
Police asked the United States Marshals Service to help find Magruder, who was arrested Thursday after the fugitive task force found him in a house in Maryland.
Magruder tried to hide from police by staying in a closet, police said.
Magruder was charged with burglary, criminal trespass, terroristic threats and harassment. He is in the Carroll County Detention Center awaiting extradition to Pennsylvania.