March 18, 1998 Hub Group, Inc. 377 East Butterfield Road, Suite 700 Lombard, Illinois 60148 Ladies and Gentlemen: We are acting as special counsel to Hub Group, Inc. (the "Company") in connection with the registration under the Securities Act of 1933, as amended, of 150,000 shares of its Class A Common Stock, $.01 par value (the "Shares"), to be offered pursuant to the Hub Group, Inc. 1997 Long-Term Incentive Plan (the "Plan"). In connection therewith, we have examined or are otherwise familiar with the Company's Certificate of Incorporation, the Company's By-Laws, the Plan, the Company's Registration Statement on Form S-8 (the "Registration Statement") relating to the Shares, relevant resolutions of the Board of Directors of the Company, and such other documents and instruments as we have deemed necessary for the purposes of 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 Plan will be legally issued, fully paid and non-assessable shares of the Company. We hereby consent to the filing of this opinion as an Exhibit to the Registration Statement. Very truly yours, MAYER, BROWN & PLATT