1
                                                                     EXHIBIT 5.1

                       [Letterhead of Baker Botts L.L.P.]

July 31, 2001

066959.0142

Administaff, Inc.
19001 Crescent Springs Drive
Kingwood, Texas 77339-3802

Ladies and Gentlemen:

         As set forth in the Registration Statement on Form S-8 (the
"Registration Statement") to be filed by Administaff, Inc., a Delaware
corporation (the "Company"), with the Securities and Exchange Commission (the
"Commission") under the Securities Act of 1933, as amended (the "Securities
Act"), relating to up to 1,500,000 shares (the "Shares") of common stock, par
value $0.01 per share (the "Common Stock"), of the Company and associated rights
to purchase Series A Junior Participating Preferred Stock, par value $0.01 per
share (the "Rights"), of the Company, which may be offered and sold from time to
time pursuant to the Administaff, Inc. 2001 Incentive Plan (the "Plan"), certain
legal matters in connection with the Shares subject to original issuance by the
Company and the Rights associated therewith are being passed upon for you by us.
At your request, this opinion is being furnished to you for filing as Exhibit
5.1 to the Registration Statement.

         In our capacity as your counsel in the connection referred to above and
as a basis for the opinions hereinafter expressed, we have examined (i) the
Company's Certificate of Incorporation and Bylaws, each as amended to date, (ii)
a copy of the Plan, (iii) the Rights Agreement, dated as of February 4, 1998,
between the Company and Harris Trust and Savings Bank, as Rights Agent, and all
amendments thereto (as amended, the "Rights Agreement"), (iv) originals, or
copies certified or otherwise identified, of corporate records of the Company,
(v) certificates of public officials and of representatives of the Company and
(vi) statutes and other instruments or documents. In giving such opinions, we
have relied upon a certificate of officers of the Company with respect to the
accuracy of the material factual matters contained in such certificate. We have
assumed that all signatures on all documents examined by us are genuine, that
all documents submitted to us as originals are accurate and complete, that all
documents submitted to us as copies are true and correct copies of the originals
thereof and that all information submitted to us was accurate and complete.

         On the basis of the foregoing, and subject to the assumptions,
limitations and qualifications hereinafter set forth, we are of the opinion
that:

         1. The Company is a corporation duly organized and validly existing in
     good standing under the laws of the State of Delaware.

         2. In the case of Shares originally issued by the Company pursuant to
     the provisions of the Plan following due authorization of a particular
     award thereunder by a

   2

     duly constituted and acting committee of the Board of Directors of the
     Company as provided in and in accordance with the Plan, the Shares issuable
     pursuant to such award will have been duly authorized by all necessary
     corporate action on the part of the Company. Upon issuance and delivery of
     such Shares from time to time pursuant to the terms of such award for the
     consideration established pursuant to the terms of the Plan and otherwise
     in accordance with the terms and conditions of such award, including, if
     applicable, the lapse of any restrictions relating thereto, the
     satisfaction of any performance conditions associated therewith and any
     requisite determinations by or pursuant to the authority of the Board of
     Directors or a duly constituted and acting committee thereof as provided
     therein, and, in the case of stock options, the exercise price thereof and
     payment for such Shares as provided therein, such Shares will be validly
     issued, fully paid and nonassessable.

         3. The issuance of the Rights associated with the Shares referred to in
     paragraph 2 above has been duly authorized by all requisite corporate
     action on the part of the Company and, upon issuance from time to time in
     connection with the issuance of the associated Shares as provided in
     paragraph 2 above and in accordance with the terms of the Rights Agreement,
     the Rights associated with such Shares will be validly issued.

         The opinion set forth in paragraph 3 above is limited to the valid
issuance of the Rights under the General Corporation Law of the State of
Delaware. In this connection, we do not express any opinion herein on any other
aspect of the Rights, the effect of any equitable principles or fiduciary
considerations relating to the adoption of the Rights Agreement or the issuance
of the Rights, the enforceability of any particular provisions of the Rights
Agreement, or the provisions of the Rights Agreement which discriminate or
create unequal voting power among stockholders.

         This opinion is limited to the original issuance of Shares and Rights
by the Company and does not cover shares of Common Stock and related Rights
delivered by the Company out of shares and related Rights reacquired by it.

         We are members of the Texas Bar and the opinions set forth above are
limited in all respects to matters of Texas law and the General Corporation Law
of the State of Delaware as in effect on the date hereof. We hereby consent to
the filing of this opinion as an exhibit to the Registration Statement. In
giving this consent, however, we do not hereby admit that we are within the
category of persons whose consent is required under Section 7 of the Securities
Act, or the rules and regulations of the Commission thereunder.

                                       Very truly yours,

                                       BAKER BOTTS L.L.P.