SEATTLE — Facebook and Google are under the microscope for the ways their technologies can spread misinformation, while Amazon’s growing market power is a regular target of President Trump. And Apple pioneered the modern smartphone, a device increasingly seen as too addicting.

Then there’s Microsoft, a giant that spent most of the 1990s and early 2000s as tech’s biggest company and villain. It now seems to be auditioning for a different role: the industry’s moral conscience.

Among the five most valuable tech companies, Microsoft is the only one to avoid sustained public criticism about contributing to social ills in the last couple of years. At the same time, Satya Nadella, its chief executive, and Brad Smith, its president, have emerged as some of the most outspoken advocates in the industry for protecting user privacy and establishing ethical guidelines for new technology like artificial intelligence.

On Monday, the conscientious side of Microsoft was on display again at Build, a three-day conference for developers in Seattle. Mr. Nadella announced a program, A.I. for Accessibility, that will award $25 million over five years to researchers, nonprofits and developers who use artificial intelligence to help people with disabilities. Mr. Nadella, whose adult son was born with cerebral palsy, has written about how his son’s disability helped make him more empathetic.