During his court appearance, Melvin Martin Jr., 30, waived extradition to Kentucky, where he will face murder charges.
According to police, Martin took a Greyhound bus from his home in Louisville, Kentucky, to Chicago on Friday to visit family. They said he traveled with multiple bags of his girlfriend's remains.
WATCH: Full update from Markham police
Investigators believe Martin killed the 31-year-old woman last month. The remains were discovered on Tuesday by Martin's relatives, who contacted police.
"This was a particularly heinous crime in that the offender, in this case, dismembered her body," said Markham Chief Terry White.
After arriving, Martin's relatives said he kept asking them for clothing, which they found odd because he had his bags, but never opened them.
Police said on Tuesday morning Martin left his relatives' home and went to a library. While there, a curious relative opened one of the bags and found body parts inside. The family called police, who discovered more human remains in the other bags.
"Without their cooperation in this case, our investigation would have been greatly hampered," said White.
Martin was taken into custody while at the library.
Law enforcement from Louisville traveled to Illinois to interview the suspect. After initially resisting, Martin is now cooperating with law enforcement, police said.
Investigators said Martin told them that he brought the remains with him because he "wanted to remain with her, or at least part of her." Police have not released a motive for the killing.
"It's hard just to grasp that someone can do something like this," said resident Reginald King. "You see it in movies, you hear about it, but to actually happen in your neighborhood. Wow."
Police said Martin gave Kentucky investigators the location of the rest of his girlfriend's remains. He directed them to a park near the couple's home.
Markham police said they are working with federal law enforcement and police in Kentucky. They have not publicly identified the victim.