Judge Eloy Velasco will probe the visit by Coulibaly, his partner Hayat Boumeddiene and a "third person who may have helped her reach Syria," the source told news agency AFP.
The move come after French television channel M6 broke the news that Coulibaly, who killed one police officer and four French Jews in violence related to the attack on satirical magazine Charlie Hebdo, travelled to Madrid with his partner Hayat Boumeddiene on December 30th before returning to Paris on January 2nd.
French authorities have been in contact with their Spanish counterparts to determine if Coulibaly, who was known to French domestic intelligence had contact with anyone else while in the Spanish capital.
His partner Boumeddienne flew from Madrid to Istanbul on January 2nd before travelling on to Syria on January 8th. She is now wanted by police.
The 32-year-old Coulibaly was an ally of the brother Chérif and Said Kouachi, responsible for the attack on Charlie Hebdo in which 12 people were killed.
Coulibaly – who met Chérif Kouachi in prison – was sentenced to five years in prison in 2013 for his role in a failed bid to break an Algerian Islamist, Smain Ait Ali Belkacem, out of jail.
In 2010, Coulibaly and Boumedienne were spotted by intelligence services visiting al-Qaeda terrorist Djamel Beghal – an associate of radical London cleric Abu Hamza – in Cantal, southern France.
Boumeddiene and Chérif's girlfriend spoke "more than 500" times by phone in 2014, said Paris's chief prosecutor Francois Molins.