<Page>

                                                               EXHIBIT 23.1


                    Consent of Independent Auditors

We consent to the reference to our firm under the captions "Experts" and
"Selected Financial Data" and to the use of our report dated March 6, 2003,
in the Registration Statement (Form S-1) and related Prospectus of NitroMed,
Inc. for the registration of $100,000,000 of its Common Stock.

                                                    /s/ Ernst & Young LLP

Boston, Massachusetts
August 15, 2003