<PAGE>
                                                                     EXHIBIT 5.1


                                                       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


                                  July 24, 2003

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

Ladies and Gentlemen:

      We acted as counsel for Lexicon Genetics Incorporated, a Delaware
corporation (the "Company"), in connection with the preparation of the
prospectus dated December 6, 2002 and the prospectus supplement dated July 23,
2003 (the "Prospectus Supplement") with respect to the Registration Statement on
Form S-3 (Registration No. 333-101549) (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"), relating to the
issuance and sale of up to 11,500,000 shares of the Company's common stock, par
value $.001 per share (the "Shares"). The Shares are being offered, issued and
sold in an underwritten public offering pursuant to an Underwriting Agreement by
and among the Company and Morgan Stanley & Co. Incorporated, UBS Securities LLC,
CIBC World Markets Corp. and Punk, Ziegel & Company, L.P. (the "Underwriting
Agreement"). The Shares include up to 1,500,000 shares that may be issued solely
to cover over-allotments, if any.

      In our capacity as your counsel for the matter referred to above, we have
examined or are familiar with the certificate of incorporation and bylaws of the
Company, each as amended to date, and have examined the originals, or copies
certified or otherwise identified, of the Underwriting Agreement and corporate
records of the Company, including minute books of the Company as furnished to us
by the Company, certificates of representatives of the Company, and other
instruments and documents, as a basis for the opinions hereinafter expressed. In
giving such opinions, we have relied upon certificates of officers of the
Company with respect to the accuracy of the material factual matters contained
in such certificates. In making our examination, we have assumed that all
signatures on documents examined by us are genuine, that all documents submitted
to us as originals are authentic and that all documents submitted to us as
certified or photostatic copies conform to the original copies of such
documents.

      On the basis of the foregoing, and subject to the assumptions, limitations
and qualifications set forth herein, we are of the opinion that the Shares, when
issued and delivered against payment therefor as provided in the Underwriting
Agreement, will be validly issued, fully paid and non-assessable.




        AUSTIN o BEIJING o DALLAS o HOUSTON o LONDON o MOSCOW o NEW YORK

                          SINGAPORE o WASHINGTON, D.C.
<PAGE>
Lexicon Genetics Incorporated
July 24, 2003
Page 2


      This opinion is limited in all respects to the Constitution of the State
of Delaware and the Delaware General Corporation law, as interpreted by the
courts of the State of Delaware and the United States.

      We hereby consent to the filing of this opinion as an exhibit to a Current
Report on Form 8-K of the Company and to the incorporation by reference of this
opinion into the Registration Statement. 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.

