This is all that remained of Blachernae Palace, which stood on a terrace where now the Ivaz Efendi Mosque stands. The first palace was built in about 500 by Emperor Anastasius, thenceforth used by the imperial family when they came and visited the nearby Blachernae shrine. The palace was rebuilt and extended, in particular under the Comneni in the 11-12th century. Hence it became the favorite residence, more than the Great Palace. They lived here until 29th of May 1453 when Fatih Mehmet took the city.
We see restoration in progress, the tower at the left side is traditionally called Tower of Isaac Angelus, the right one in the distance Prison of Anemas (attribution discussed). A half dozen emperors were imprisoned there, tortured, murdered or mutilated. Isaac Angelus who probably built the left tower in 1188 (a tower from which the view over the Golden Horn would be superb) was blinded seven years later in the other tower. Hic transit and all that. Still, he was restored briefly in 1213 to reign together with his son Alexius. A year later he (and the son) was back in the right tower, to be strangled. Oh, the joys of power.