Officers arrested the man, identified only as Dominik R at a block of short-stay apartments in Lloret de Mar, a seaside resort roughly 70 kilometres (40 miles) northeast of Barcelona where he was hiding with the baby boy, police said in a statement.
He had been on the run since German police found the body of his 20-year-old girlfriend inside plastic garbage bags at the couple's apartment in the town of Freyung, southeastern Germany, at the end of October.
Police said the man recently got a “macabre” tattoo inked on his upper arm with the name of his deceased girlfriend, her birthday as well the suspected date of her murder – 27/10/2016 – beside a cross along with the words “Thank you for everything” in Spanish.
The National Police released a photograph of the suspect with the incriminating tattoo.
Spanish police said they began looking for the man after they were alerted by their German counterparts that he may have fled to Spain as he made his way to North Africa.
The man is suspected of having used his girlfriend's mobile phone after he killed her to update her Facebook and other social media profiles to try to throw off investigators.
Police took the toddler to a juvenile welfare home which will look after him until German social services staff arrive in Spain to pick him up.