EX-5.1 7 a2195090zex-5_1.htm EXHIBIT 5.1
QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1

BAKER, DONELSON, BEARMAN, CALDWELL & BERKOWITZ, P.C.
Baker Donelson Center, Suite 1000
211 Commerce Street
Nashville, Tennessee 37201
Phone: (615) 726-5600
Fax: (615) 726-0464

October 30, 2009

Dollar General Corporation
100 Mission Ridge
Goodlettsville, TN 37072

    Re:
    Dollar General Corporation Registration Statement on Form S-1

Ladies and Gentlemen:

        We have acted as counsel for Dollar General Corporation, a Tennessee corporation (the "Company"), in connection with the offering of shares of common stock, par value $0.875 per share ("Common Stock"), by the Company and certain selling shareholders (each a, "Selling Shareholder" and collectively, the "Selling Shareholders") listed in the registration statement on Form S-1, as amended (File No. 333-161464) (the "Registration Statement") filed by the Company with the Securities and Exchange Commission under the Securities Act of 1933, as amended (the "1933 Act"). The Registration Statement relates to the registration under the 1933 Act of: (i) up to 22,700,000 shares of Common Stock (the "Company Shares") that may be offered by the Company; and (ii) up to 16,515,000 shares of Common Stock that may be offered by the Selling Shareholders (including shares that may be sold by the Selling Shareholders upon exercise of the underwriters' over-allotment option) (the "Selling Shareholder Shares" and, collectively with the Company Shares, the "Shares"). The Shares are to be offered and sold by the Company pursuant to a Prospectus (the "Prospectus") that forms part of the Registration Statement. This opinion letter is furnished to you at your request to enable you to fulfill the requirements of Item 601(b)(5) of Regulation S-K in connection with the Registration Statement.

        In connection with the furnishing of this opinion letter, we have examined originals, or copies certified or otherwise identified to our satisfaction, of the following documents (collectively, the "Documents"):

    1.
    the Registration Statement;

    2.
    the form of the Underwriting Agreement (the "Underwriting Agreement"), included as Exhibit 1.1 to the Registration Statement;

    3.
    the form of the Amended and Restated Charter of the Company, included as Exhibit 3.1 to the Registration Statement; and

    4.
    the form of the Amended and Restated Bylaws of the Company, included as Exhibit 3.2 to the Registration Statement.

        In addition, we have examined and relied upon such records, documents, certificates and other instruments as in our judgment are necessary or appropriate to form the basis for the opinions hereinafter set forth. In all such examinations, we have assumed the genuineness of signatures on original documents, the legal capacity of all individuals who have executed any of the documents reviewed by us, the authenticity of all documents submitted to us as originals and the conformity to such original documents of all copies submitted to us as certified, conformed or photographic copies, and as to certificates of public officials, we have assumed the same to have been properly given and to be accurate. As to matters of fact material to this opinion letter, we have relied upon statements and



representations of representatives of the Company (including the representations and warranties of the Company made in the Documents) and public officials.

        The opinions set forth herein are limited to the Tennessee Business Corporation Act and the federal laws of the United States of America. Without limiting the generality of the foregoing, we express no opinion with respect to state securities or "Blue Sky" laws.

        Based upon the foregoing, and subject to the assumptions, qualifications and limitations set forth herein, we are of the opinion that:

    (1)
    The Company Shares have been duly authorized by all necessary corporate action and, when issued, delivered and paid for as contemplated in the Registration Statement and in accordance with the terms of the Underwriting Agreement, will be validly issued, fully paid and nonassessable.

    (2)
    The Selling Shareholder Shares were duly authorized by all necessary corporate action on the part of the Company and are validly issued, fully paid and nonassessable and, when delivered and paid for as contemplated in the Registration Statement and in accordance with the terms of the Underwriting Agreement, will continue to be validly issued, fully paid and nonassessable.

        This opinion letter is given as of the date hereof, and we assume no obligation to advise you after the date hereof of facts or circumstances that come to our attention or changes in law that occur which could affect the opinions contained herein. This opinion letter is being rendered for the benefit of the Company in connection with the matters addressed herein.

        We hereby consent to the filing of this opinion letter as an Exhibit to the Registration Statement and to the reference to our firm under the caption "Legal Matters" in the Prospectus. In giving this consent, we do not admit that we are within the category of persons whose consent is required by Section 7 of the 1933 Act.

Very truly yours,

/s/ BAKER, DONELSON, BEARMAN, CALDWELL & BERKOWITZ, P.C.

2




QuickLinks

BAKER, DONELSON, BEARMAN, CALDWELL & BERKOWITZ, P.C. Baker Donelson Center, Suite 1000 211 Commerce Street Nashville, Tennessee 37201 Phone: (615) 726-5600 Fax: (615) 726-0464 October 30, 2009