<PAGE>
                                                                     EXHIBIT 5.1


(VINSON & ELKINS L.L.P. LOGO)                          VINSON & ELKINS L.L.P.
                                                       2300 FIRST CITY TOWER
                                                       1001 FANNIN STREET
                                                       HOUSTON, TEXAS 77002-6760
                                                       TELEPHONE (713) 758-2222
                                                       FAX (713) 758-2346
                                                       www.velaw.com


January 21, 2005


Lexicon Genetics Incorporated
8800 Technology Forest Place
The Woodlands, Texas 77381

Re: Registration Statement on Form S-3 of Lexicon Genetics Incorporated

Ladies and Gentlemen:

         We have acted as counsel to Lexicon Genetics Incorporated (the
"Company"), a Delaware corporation, with respect to certain legal matters in
connection with the Company's Registration Statement on Form S-3 (the
"Registration Statement") relating to the registration by the Company under the
Securities Act of 1933, as amended (the "Securities Act"), of (i) unsecured debt
securities of the Company, which may be either senior or subordinated and may be
issued in one or more series, consisting of notes, debentures or other evidences
of indebtedness (the "Debt Securities"), (ii) shares of preferred stock, par
value $0.01 per share, of the Company, in one or more series (the "Preferred
Stock"), (iii) shares of common stock, par value $0.001 per share, of the
Company (the "Common Stock"), (iv) warrants for the purchase of Common Stock or
Preferred Stock (the "Warrants") and (v) units comprised of one or more shares
of Common Stock, shares of Preferred Stock, Debt Securities and Warrants in any
combination (the "Units" and, together with the Warrants, the Debt Securities,
the Preferred Stock and the Common Stock, the "Securities"). The aggregate
initial offering prices of the Securities to be offered and sold by the Company
pursuant to the Registration Statement, to which this opinion is an exhibit,
will not exceed $150,000,000 or, if applicable, the equivalent thereof in any
other currency or currency unit. The Securities will be offered in amounts, at
prices and on terms to be determined in light of market conditions at the time
of sale and to be set forth in supplements (each a "Prospectus Supplement") to
the Prospectus contained in the Registration Statement.

         We have examined originals or copies, certified or otherwise identified
to our satisfaction, of (i) the Certificate of Incorporation and Bylaws of the
Company, each as amended to the date hereof, (ii) the Registration Statement,
(iii) the form of Indenture (the "Indenture"), (iv) resolutions of the board of
directors of the Company and (v) such other certificates, statutes and other
instruments and documents as we considered appropriate for purposes of the
opinions hereafter expressed. In addition, we reviewed such questions of law, as
we considered appropriate.

         In connection with rendering the opinions set forth below, we have
assumed that (i) all information contained in all documents reviewed by us is
true and correct, (ii) all signatures on all documents examined by us are
genuine, (iii) all documents submitted to us as originals are authentic and all
documents submitted to us as copies conform to the originals of those documents,
(iv) the Registration Statement, and any amendments thereto (including
post-effective amendments), will have become effective, (v) a Prospectus
Supplement will have been prepared and filed with the Commission describing the
Securities offered thereby, (vi) all Securities will be issued and sold in
compliance with applicable federal and state securities laws and in the manner
specified in the Registration Statement and the applicable Prospectus
Supplement, (vii) the Indenture relating to the Debt Securities and a warrant
agreement ("Warrant Agreement") relating to the Warrants will each be duly
authorized, executed and


              AUSTIN o BEIJING o DALLAS o HOUSTON o LONDON o MOSCOW
                    o NEW YORK o SINGAPORE o WASHINGTON, D.C.

<PAGE>
Page 2
January 21, 2005


delivered by the parties thereto, (viii) each person signing the Indenture and a
Warrant Agreement will have the legal capacity and authority to do so, (ix) at
the time of any offering or sale of any shares of Common Stock and/or Preferred
Stock, that the Company shall have such number of shares of Common Stock and/or
Preferred Stock, as set forth in such offering or sale, authorized or created
and available for issuance, (x) a definitive purchase, underwriting or similar
agreement with respect to any Securities offered will have been duly authorized
and validly executed and delivered by the Company and the other parties thereto,
and (xi) any Securities issuable upon conversion, exchange or exercise of any
Debt Securities or Preferred Stock being offered will have been duly authorized,
created and, if appropriate, reserved for issuance upon such conversion,
exchange or exercise.


         Based on the foregoing, and subject to the assumptions, qualifications,
limitations, and exceptions set forth herein, we are of the opinion that:

         1. When (a) the applicable Indenture relating either to senior Debt
            Securities or subordinated Debt Securities has been duly qualified
            under the Trust Indenture Act of 1939, as amended, (b) the board of
            directors of the Company (or a committee thereof) has taken all
            necessary corporate action to approve the issuance and terms of any
            such Debt Securities, (c) the terms of such Debt Securities and of
            their issuance and sale have been duly established in conformity
            with the applicable Indenture so as not to violate any applicable
            law or result in a default under or breach of any agreement or
            instrument binding upon the Company and so as to comply with any
            requirements or restrictions imposed by any court or governmental
            body having jurisdiction over the Company, (d) any shares of Common
            Stock issuable upon the conversion of such Debt Securities, if
            applicable, have been duly and validly authorized for issuance and
            (e) such Debt Securities have been duly executed and authenticated
            in accordance with the applicable Indenture and issued and sold as
            contemplated in the Registration Statement and upon payment of the
            consideration for such Debt Securities as provided for in the
            applicable definitive purchase, underwriting or similar agreement,
            such Debt Securities will be legally issued and such Debt Securities
            will constitute valid and legally binding obligations of the
            Company, enforceable against the Company in accordance with their
            terms, except as such enforcement is subject to any applicable
            bankruptcy, insolvency (including, without limitation, all laws
            relating to fraudulent transfers), reorganization, moratorium and
            similar laws relating to or affecting creditors' rights generally
            and to general equitable principles (regardless of whether
            enforcement is sought in a proceeding in equity or at law);

         2. With respect to shares of Common Stock, when (i) the board of
            directors of the Company has taken all necessary corporate action to
            approve the issuance and terms of the offering thereof and related
            matters; and (ii) certificates representing the shares of Common
            Stock have been duly executed, countersigned, registered and
            delivered either (A) in accordance with the applicable definitive
            purchase, underwriting or similar agreement approved by the board of
            directors of the Company, then upon payment of the consideration
            therefor (not less than the par value of the Common Stock) provided
            for therein; or (B) upon conversion, exchange or exercise of any
            other Security in accordance with the terms of the Security or the
            instrument governing the Security providing for the conversion,
            exchange or exercise as approved by the board of directors of the
            Company, for the consideration approved by the board of directors of
            the Company (not less than the par value of the Common Stock), such
            shares of Common Stock will be validly issued, fully paid and
            non-assessable.

<PAGE>
Page 3
January 21, 2005


         3. When (a) the terms of any Warrants and of their issuance and sale
            have been duly established in conformity with the applicable Warrant
            Agreement so as not to violate any applicable law or result in a
            default under or breach of any agreement or instrument binding upon
            the Company and so as to comply with any requirements or
            restrictions imposed by any court or governmental body having
            jurisdiction over the Company, and (b) the Warrants have been duly
            executed and authenticated in accordance with the applicable Warrant
            Agreement and issued and sold as contemplated in the Registration
            Statement, the Warrants will constitute valid and legally binding
            obligations of the Company, subject to bankruptcy, insolvency
            (including, without limitation, all laws relating to fraudulent
            transfers), reorganization, moratorium and similar laws relating to
            or affecting creditors' rights generally and to general equitable
            principles (regardless of whether enforcement is sought in a
            proceeding in equity or at law).

         With respect to our opinions expressed above, as they relate to Debt
Securities denominated in a currency other than U.S. dollars, we note that
effective enforcement of a foreign currency claim in the New York State courts
or the federal courts sitting in the State of New York may be limited by
requirements that the claim (or a foreign currency judgment in respect of such
claim) be converted to U.S. dollars at the rate of exchange prevailing on a
specified date. We express no opinion as to whether a federal court sitting in
the State of New York would award a judgment in a currency other than U.S.
dollars.

         We express no opinions concerning (a) the validity or enforceability of
any provisions contained in the Indenture that purport to waive or not give
effect to rights to notices, defenses, subrogation or other rights or benefits
that cannot be effectively waived under applicable law; or (b) the
enforceability of indemnification provisions to the extent they purport to
relate to liabilities resulting from or based upon negligence or any violation
of federal or state securities or blue sky laws.

         The foregoing opinions are limited to the laws of the State of New
York, the State of Texas, the General Corporation Laws of the State of Delaware
(including the applicable provisions of the Delaware Constitution and the
reported judicial decisions interpreting these laws) and the federal laws of the
United States of America and we are expressing no opinion as to the effect of
the laws of any other jurisdiction, domestic or foreign.

         We hereby consent to the filing of this opinion as an exhibit to the
Registration Statement and to the use of our name in the Prospectus forming a
part of the Registration Statement under the caption "Legal Matters." In giving
this consent, we do not admit that we are within the category of persons whose
consent is required under Section 7 of the Securities Act and the rules and
regulations thereunder.

                                             Very truly yours,

                                             /s/ Vinson & Elkins L.L.P.

