He is most remarkable for his efforts to educate Trujillo's Indians and for his research into local plants, animals, archaeological ruins, music, and native cultures.
In 1767, King Charles III of Spain named Martínez Compañón choirmaster of the Metropolitan Cathedral of Lima, Peru.
He planned to create special schools for Indian boys and girls where they would learn trade and craft skills as well as basic literacy.
After arriving in Bogotá on March 12, 1791, Martínez Compañón repaired local churches, founded five primary schools throughout the city, and established a seminary.
He also sent to Spain a nine volume set of watercolor images depicting the people, plants, and animals of Trujillo, the Codex Martínez Compañón.