<Page>
                                                                    EXHIBIT 23.1

                     CONSENT OF INDEPENDENT AUDITORS

We consent to the incorporation by reference in the Registration Statement (Form
S-8 No. 333-111302) pertaining to the Amended and Restated 1993 Equity Incentive
Plan, the Amended and Restated 2003 Stock Incentive Plan, and the 2003 Employee
Stock Purchase Plan of NitroMed, Inc. of our report dated February 19, 2004,
with respect to the financial statements of NitroMed, Inc. included in the
Annual Report (Form 10-K) for the year ended December 31, 2003.


                                   /s/ Ernst & Young LLP


Boston, Massachusetts
March 26, 2004