He arrived in China in 1672 and first stayed in the Portuguese colony of Macau, where he was enrolled in the University College of St.
Paul.
Pereira was later sent to Beijing to work in the court of the Kangxi Emperor, where he stayed during most of his career.
In 1689, the Kangxi Emperor sent Pereira and his colleague Jean-François Gerbillon to interpret at the negotiations between Qing China and the Russian Empire in Nerchinsk, which eventually resulted in the Treaty of Nerchinsk.
Between 1688 and 1694, Pereira and Antoine Thomas were unofficial directors of the imperial observatory in Beijing as the actual director was not in China at the time.