The 43-year-old actress, whose hometown of Barranquilla is just two hours north of Cartagena, was handed the keys during a ceremony at the city's Santa Clara Hotel.
Mayor Manuel Vicente Duque was on hand to present Sofia with the honour, and following the event, he gushed over the actress and the pride the country has for its native daughter, reported Contactmusic.
"Sofia's humble personality says it all. She was happy and delighted to be receiving the keys to the city surrounded by the Cartagena ambience... Sofia more than deserves these keys. She is a Barranquillera that has put Colombia's name up high," Mayor Duque said.
The actress jetted off to her native Colombia last week to attend the wedding of a family member. She posted a series of party pictures on Instagram. She also mixed business with pleasure by filming a commercial for beer brand Cerveza Aguila.
She was joined by her son Manolo and other relatives, but noticeably missing was her husband Joe Manganiello, who is recovering from emergency surgery.