The original structure was a simple chapel built in 1521 dedicated to the Virgin Mary and known as the Nossa Senhora da Annunciada (Our Lady of the Annunciation). The chapel was built by a Portuguese fidalgo or nobleman, Duarte Coelho, as an act of gratitude following his escape from a storm in the South China Sea.

The chapel was deeded to the Society of Jesus in 1548 by the Bishop of Goa, João Afonso de Albuquerque, with the title deeds received by St. Francis Xavier. The chapel was then further enlarged in 1556 with the addition of a second floor, and a belfry tower was added in 1590. The chapel was then renamed the Igreja de Madre de Deus (Church of the Mother of God). A burial vault was opened in 1592 and many people of distinction were buried there, including Pedro Martins, the second Bishop of Funay, Japan.

According to wikipedia