The construction of the Palace of Raio was ordered by João Duarte de Faria, a knight of the Military Order of Christ, who was a rich merchant.
The commission was given to André Soares in 1754–1755, an architect already famous in the Braga region for his artistic and engineering projects. Soares reformulated the style first introduced to Porto by Nasoni, basing his interpretations on French-German sketches, "one of the expressions more distinct and powerful of the European Rococo". His work is characterized by the monumental nature of its forms, and for his use of natural elements in the decorative sculptures that permeate the design, including the shells, jars, wreaths and garlands. These elements show the influence of the Augsburg sketches, or the Frenchman Meissonier, among others. In the context of Portuguese art, André Soares was part of the end of the Baroque period, and beginning of the Rococo; his style used the structure of the Baroque, but the decorative style of the Rococo. André Soares had worked on the Sanctuary of Bom Jesus and the Church of Santa Maria Madalena da Falperra, and the Raio Palace is seen as an extension of the "festive character of Falperra".
A century later, the residence was acquired by Miguel José Raio, then Viscount of São Lázaro (in 1867), and over time, it became known as the Palace of Raio.
The Escola Profissional de Recuperação do Património de Sintra (Professional School for Recuperation of Sintra Patrimony) intervened in 1993 to repair the doors and windows on this first floor. The group was responsible for repairing the wood frames, cleaning of the stone from damage caused by humidity, completing moulds, installation of artificial stoneworks, reinforcing the structure with cement and reintegration of many of the sculptures. Matos Sequeira, an archeologist, once referred to the facade as similar to a piece of furniture from the court of King Louis XV.