EXHIBIT 5.1 PALMER & DODGE LLP One Beacon Street, Boston, MA 02108-3190 Telephone: (617) 573-0100 Facsimile: (617) 227-4420 May 6, 1997 MAXIMUS, Inc. 1356 Beverly Road McLean, VA 22101 We are rendering this opinion in connection with the Registration Statement on Form S-1 (the "Registration Statement") filed by MAXIMUS, Inc. (the "Company") with the Securities and Exchange Commission under the Securities Act of 1933, as amended, on or about the date hereof. The Registration Statement relates to up to 5,060,000 shares of the Company's Common Stock, no par value (the "Shares"), being sold by the Company and certain stockholders of the Company (the "Selling Stockholders"), including 660,000 Shares issuable upon exercise of the overallotment option granted by the Selling Stockholders. We understand that the Shares are to be offered and sold in the manner described in the Registration Statement. We have acted as your counsel in connection with the preparation of the Registration Statement. We are familiar with the proceedings of the Board of Directors on January 31, 1997 in connection with the authorization, issuance and sale of the Shares (the "Resolutions"). We have examined such other documents as we consider necessary to render this opinion. Based upon the foregoing, we are of the opinion that the Shares have been duly authorized and, when issued and delivered by the Company against payment therefor at the price to be determined pursuant to the Resolutions, will be validly issued, fully paid and non-assessable. We hereby consent to the filing of this opinion as a part of the Registration Statement and to the reference to our firm under the caption "Legal Matters" in the Prospectus filed as part thereof. Very truly yours, /s/ Palmer & Dodge LLP ------------------------------------------- Palmer & Dodge LLP