<Page> EXHIBIT 5.1 [ROPES & GRAY LETTERHEAD] September 17, 2002 StemCells, Inc. 3155 Porter Drive Palo Alto, CA 94304 Ladies and Gentlemen: We have acted as counsel to StemCells Inc., a Delaware corporation (the "Company"), in connection with the Post-Effective Amendment No. 1 to the Registration Statement on Form S-3, Registration No. 333-88992 (the "Registration Statement") filed by the Company with the Securities and Exchange Commission (the "Commission") under the Securities Act of 1933, as amended (the "Securities Act"), with respect to (i) shares of preferred stock, par value $0.01 per share, of the Company (the "Preferred Stock"); (ii) shares of common stock, par value $0.01 per share, of the Company (the "Common Stock"); and (iii) warrants for the purchase of Preferred Stock or Common Stock ("Warrants"). The Preferred Stock, Common Stock and Warrants are referred to herein collectively as the "Securities." The Securities being registered under the Registration Statement will have an aggregate offering price of up to $37,800,000 and may be issued from time to time on a delayed or continuous basis pursuant to Rule 415 under the 1933 Act. We have acted as counsel for the Company in connection with its proposed issuance and sale of the Securities. For purposes of this opinion, we have examined and relied upon such documents, records, certificates and other instruments as we have deemed necessary. The opinions expressed below are limited to the Delaware General Corporation Law and the federal laws of the United States. For purposes of this opinion, we have assumed with respect to the issuance and sale of any particular class of Securities under the Registration Statement: - the Registration Statement and all post-effective amendments thereto have become effective and comply with all applicable laws; - a prospectus supplement with respect to the particular class of Securities has been filed in compliance with the Securities Act and the applicable rules thereunder; - all Shares will be issued and sold in compliance with applicable federal and state securities laws and in the manner stated in the Registration Statement and the appropriate prospectus supplement; - if the Securities are to be sold pursuant to a purchase agreement, such purchase agreement has been duly authorized, executed and delivered by the Company and the other parties thereto; and - the Board of Directors (or a committee authorized to act on its behalf) and appropriate officers of the Company have taken all necessary corporate action to approve the terms of the Securities and the terms of the offering. Subject to the foregoing, we are of the opinion that: 1. With respect to an offering of any of the shares of Common Stock, when certificates representing the shares of the Common Stock in the form of the specimen certificates examined by us are duly executed, countersigned, registered and delivered upon payment of the agreed-upon consideration, the shares of Common Stock, when issued and sold in accordance with the applicable purchase agreement, will be duly authorized, validly issued, fully paid and nonassessable, assuming that <Page> September 17, 2002 a sufficient number of shares of Common Stock are authorized and available for issuance and that the consideration therefor is not less than the par value of the shares of Common Stock. 2. With respect to an offering of any of the shares of Preferred Stock, when a certificate of designations has been filed with the Delaware Secretary of State establishing the terms of the series of Preferred Stock and certificates representing the shares of the Preferred Stock in the form of the specimen certificates examined by us are duly executed, countersigned, registered and delivered upon payment of the agreed-upon consideration, the shares of Preferred Stock, when issued and sold in accordance with the purchase agreement, will be duly authorized, validly issued, fully paid and nonassessable, assuming that a sufficient number of shares of Preferred Stock are authorized and available for issuance and that the consideration therefor is not less than the par value of the shares of Preferred Stock. 3. With respect to an offering of any of the Warrants, when warrant certificates representing the Warrants in the form examined by us are duly executed, countersigned, registered and delivered upon payment of the agreed-upon consideration therefor, (1) the Warrants, when issued and sold in accordance with the purchase agreement, will be valid and binding obligations of the Company, enforceable against the Company in accordance with their terms, except as may be limited by bankruptcy, insolvency and other similar laws affecting the rights and remedies of creditors generally and general principles of equity; and (2) shares of the Company's capital stock issuable upon exercise of the Warrants will be validly issued, fully paid and nonassessable, assuming that the exercise of the Warrants is in accordance with the terms of the Warrants and that sufficient shares of capital stock are authorized or reserved and available for issuance and that the consideration for such shares is not less than the par value of such capital stock. We hereby consent to your filing a form of this opinion as an exhibit to the Registration Statement and to the use of our name therein and in the related prospectus and prospectus supplement under the caption "Legal Matters." This opinion may be used only in connection with the offer and sale of the Securities while the Registration Statement is in effect. <Table> Very truly yours, /s/ ROPES & GRAY --------------------------------------------- Ropes & Gray </Table>