Final answer:
The legislation that prohibits accounting firms from providing consulting services to companies they audit is the Sarbanes-Oxley Act.
Step-by-step explanation:
The legislation that prohibits accounting firms from providing consulting services to companies they audit is the Sarbanes-Oxley Act. This act was passed in 2002 in response to major accounting scandals involving corporations like Enron, Tyco International, and WorldCom. The aim of Sarbanes-Oxley is to protect investors and increase confidence in financial information provided by public corporations, by preventing potential conflicts of interest between accounting firms and the companies they audit.