It is unlawful for a law firm, as an employer, to discriminate in its hiring, promotion, assignment of duties, etc., just when it is unlawful for any other employer to discriminate. There is no law firm exemption in the United States.
The legal profession also has a code of professional responsibility, which varies in certain respects state by state, bar by bar. There also exists a Model Code, under the authority of the ABA.
That said, are there specific anti-discrimination ethical principles, in particular in that model code? I've only recently learned that there are.
Here is a discussion.