Dunlap had to be arraigned before a Berkeley County magistrate because he was arrested in Martinsburg, Harmon said.
Dunlap was arraigned on a murder charge by Magistrate Harry Snow and was placed in the Eastern Regional Jail without bond, Harmon said.
Harmon said Dunlap was "reserved" during the process and appeared to be relatively healthy.
Dunlap's preliminary hearing will have to be conducted within 10 days.
Dunlap's girlfriend, Jennifer Leigh Dodson, 20, of 308 New Oak Tree Court in the Willow Spring Farm apartment complex, was found dead inside her apartment around 9 a.m. last Thursday. Police said her throat had been cut.
The apartment complex is off Prospect Avenue, outside Charles Town's city limits.
Dodson's sister and two friends found her body, face down on her living room floor, Jefferson County Sheriff Everett "Ed" Boober has said.
The women had gone to the apartment to pick up a 2-year-old child Dodson was baby-sitting. Dodson's 1-year-old daughter also was found inside the apartment, unharmed in her crib, Boober said.
Boober said that friends and family members told police that Dodson and Dunlap were having a sexual relationship, but that Dodson had been trying to end it.
Dunlap, 45, of 312 Williams St., was hospitalized last Thursday morning after he was found slumped over the wheel of his pickup truck, which was locked and parked at the Princess Street boat ramp in Shepherdstown, W.Va., police said.
Inside the truck, police found two large kitchen knives, one which had blood on it, police said.
Boober said he could only speculate about how Dunlap contracted pneumonia. Boober said hospital officials had not told him how Dunlap may have become ill.
Boober said he was told that Dunlap took a large number of pills after his girlfriend died.