St. John lived here with the Virgin Mary after being cast out of Jerusalem in 37-42 A.D. according to legend, and it is thought to be here that St.John wrote his gospel, and was buried in the church bearing his name in accordance with his dying wishes. A wooden basilica was first constructed on the site, above his grave, in the 4th century A.D., which was replaced in the 5th century by the present church, built during the reign of the Byzantine emperor, Justinian (577-565 A.D.).
During the 7th and 8th centuries, Ephesus was under constant siege by the Arabs, when the church was surrounded by a wall, which varied in structure over the years, but possessed 20 towers and three gates. The grand portal is the gate now used by visitors. The two other gates are to the east and west. The walls were built with stones taken from the Gymnasium of Ephesus, as if in revenge for the Christians thrown to the lions in that stadium during the first years of Christianity. The Church is entered via the main portal dating to the 6th century, which consists of an arched entrance flanked by two towers, leading to a small atrium where one may see inscriptions related to the Church, which were uncovered there during excavations. This atrium, which measures 34x47 m. is on the western front, and consists of a central court surrounded by an arched portico with a balustraded gallery to "the exterior. A number of amphora dating from various periods are to be seen in the centre of the court. A three celled cistern is buried below the western portal, and covered with a vault. This is buttressed with flanking walls to compensate for the curve of the site.
Between the atrium and the nave of the church is a long narrow narthex. Massive lentils of dressed marble frame the three doors leading to the atrium and into the nave from the narthex. A wall and a number of portals were added between the atrium and the narthex at a later date, to create an exonarthex. Five cupola surmount the narthex itself. The main church is cruciform in plan, a classic plan with three naves, and a superstructure of six, large domes over the main nave, with vaulted flanking naves. The domes were originally supported by marble and brickbond piers, still partially in situ, with a row of blue-veined marble columns lining the Church between the naves. The monograms of Theodora, wife of Justinian, are engraved on these columns, which enables us to date the structure. The above mentioned rows of Columns are joined by a series of arches which in turn support a second row of arches at gallery level. The mausoleum chamber is situated before the apse in the central nave, and is marked out by being raised from the rest of the nave, with two steps between.
A chapel, originally part of the treasury in the court, was converted for devotional use in the 10th century. The frescos of St. John, Christ and other sacred figures are contained in the apse. The treasury is reached via a gate immediately before it. This is a centrally-planned chamber, 6.30 m. in diameter, fronted by an absidal vaulted hall and flanked by a chapel. The main chamber is sub-divided by a cruciform plan, into a series of cells, each containing vaulted niches. It is a two-course building surmounted originally by a dome, now in ruins. The baptistery is reached via a portal letting into the forehall of the treasury. It is connected to the Church via a long narrow corridor running parallel to the northern nave. The baptismal pool dates to the 6th century, and was originally a tomb.
The plan of the Baptistery is somewhat complex. The main chamber is octagonal in plan, and is framed by a narrow corridor and flanked on two sides by absidal-planned halls. The main baptistery is paved with marble, with the pool in the centre. The baptistery predates the Justinian church, being built in the 5th century.