QuickLinks -- Click here to rapidly navigate through this document


EXHIBIT 5.1

July 20, 2001

Aerogen, Inc.
1310 Orleans Drive
Sunnyvale, CA 94089

Ladies and Gentlemen:

    You have requested my opinion with respect to certain matters in connection with the filing by Aerogen, Inc. (the "Company") of a Registration Statement on Form S-8 (the "Registration Statement") with the Securities and Exchange Commission covering the offering of up to 1,126,876 shares of the Company's Common Stock, $.001 par value, (the "Shares") pursuant to its 2000 Equity Incentive Plan and 2000 Employee Stock Purchase Plan (together, the "Plans").

    In connection with this opinion, I have examined the Registration Statement and related Prospectus, your Certificate of Incorporation and By-laws, as amended, and such other documents, records, certificates, memoranda and other instruments as I deem necessary as a basis for this opinion. I have assumed the genuineness and authenticity of all documents submitted to me as originals, the conformity to originals of all documents submitted to me as copies thereof, and the due execution and delivery of all documents where due execution and delivery are a prerequisite to the effectiveness thereof.

    On the basis of the foregoing, and in reliance thereon, I am of the opinion that the Shares, when sold and issued in accordance with the Plans, the Registration Statement and related Prospectus, will be validly issued, fully paid, and nonassessable (except as to shares issued pursuant to certain deferred payment arrangements, which will be fully paid and nonassessable when such deferred payments are made in full).

    I consent to the filing of this opinion as an exhibit to the Registration Statement.

Very truly yours,  

/s/ 
CAROL A. GAMBLE   
Carol A. Gamble
Vice President and General Counsel

 



QuickLinks