EXHIBIT 5.1 September 11, 1997 Hub Group, Inc. 377 East Butterfield Road, Suite 700 Lombard, Illinois 60148 Re: Class A Common Stock, $.01 par value per share ---------------------------------------------- Ladies and Gentlemen: We have acted as special counsel to Hub Group, Inc., a Delaware corporation (the "Company"), in connection with the registration under the Securities Act of 1933, as amended (the "Securities Act"), of 172,500 shares of its Class A Common Stock, $.01 par value per share (the "Shares"), that may be purchased pursuant to a public offering by the Company. We have also participated in the preparation and filing with the Securities and Exchange Commission under the Securities Act of a registration statement on Form S-3 (the "Registration Statement") relating to the Shares. In this connection, we have examined such corporate and other records, instruments, certificates and documents as we considered necessary to enable us to express this opinion. Based upon the foregoing, we are of the opinion that the Shares are duly authorized for issuance and when issued in accordance with the provisions of the Registration Statement will be legally issued, fully paid and non-assessable Shares of the Company. We consent to the filing of this opinion as an exhibit to the Registration Statement and to the reference to us under the caption "Legal Matters." Very truly yours, /s/ Mayer, Brown & Platt MAYER, BROWN & PLATT