
<PAGE>
                                                                     EXHIBIT 5.1
 
                                 HALE AND DORR
                               COUNSELLORS AT LAW
                                60 STATE STREET
                          BOSTON, MASSACHUSETTS 02109
                                November 8, 1996
 
Staples, Inc.
One Research Drive
Westborough, MA 01581
 
Ladies and Gentlemen:
 
    This opinion is furnished to you in connection with a Registration Statement
on Form S-4 (the Registration Statement"), filed with the Securities and
Exchange Commission (the "Commission") under the Securities Act of 1933, as
amended, for the registration of up to an aggregate of 190,000,000 shares of
Common Stock (the "Common Stock"), $.0006 par value per share, of Staples, Inc.,
a Delaware corporation (the "Company").
 
    We have acted as counsel for the Company in connection with the issuance of
the shares of Common Stock pursuant to an Agreement and Plan of Merger (the
"Merger Agreement") dated as of September 4, 1996, among the Company, Marlin
Acquisition Corp. and Office Depot, Inc. We have examined signed copies of the
Registration Statement and all exhibits thereto (including but not limited to
the Merger Agreement), all as filed with the Commission. We have also examined
and relied upon the original or copies of minutes of meetings of the
stockholders and Board of Directors of the Company, stock record books of the
Company, a copy of the Amended and Restated By-Laws of the Company, a copy of
the Restated Certificate of Incorporation of the Company and such other
documents as we have deemed material to our opinion set forth below.
 
    Based upon the foregoing, we are of the opinion that the shares of Common
Stock to be issued pursuant to the Merger Agreement are duly authorized and,
when issued in accordance with the terms of the Merger Agreement, will be
validly issued, fully paid and nonassessable.
 
    We hereby consent to the filing of this opinion as part of the Registration
Statement and to the use of our name therein and in the related Prospectus under
the captions "The Merger--Certain Federal Income Tax Consequences" and "Legal
Matters."
 
    This opinion is to be used only in connection with the issuance of Common
Stock while the Registration Statement is in effect.
 
                                          Very truly yours,
                                          /s/ Hale and DORR
                                          HALE AND DORR
