dechertlogo.jpg
1900 K Street, NW
Washington, DC 20006-1110
+1 202 261 3300 Main
+1 202 261 3333 Fax
www.dechert.com

Exhibit 5.1

June 4, 2024

Main Street Capital Corporation
1300 Post Oak Boulevard, Suite 800
Houston, TX 77056
Ladies and Gentlemen:
We have acted as counsel to Main Street Capital Corporation, a Maryland corporation (the “Company”), in connection with the preparation and filing of a registration statement on Form N-2 (File No. 333-263258) (as amended as of the date hereof, the “Registration Statement”) filed by the Company with the U.S. Securities and Exchange Commission (the “Commission”) under the Securities Act of 1933, as amended (the “Securities Act”), which became effective immediately upon its filing on March 3, 2022, and the final prospectus supplement, dated May 28, 2024 (including the base prospectus filed therewith, the “Prospectus”), filed with the Commission on May 29, 2024 pursuant to Rule 424 under the Securities Act, relating to the proposed issuance by the Company of $300,000,000 aggregate principal amount of 6.500% notes due 2027 (the “Notes”), to be sold to underwriters pursuant to an underwriting agreement, dated as of May 28, 2024, which is substantially in the form filed as Exhibit 1.1 to the Company’s Current Report on Form 8-K filed with the Commission on May 30, 2024 (the “Underwriting Agreement”). All of the Notes are to be sold by the Company as described in the Registration Statement and related Prospectus. This opinion letter is being furnished to the Company in accordance with the requirements of Item 25 of Form N-2 under the Securities Act, and we express no opinion herein as to any matter other than as to the legality of the Notes.
The Notes will be issued pursuant to the indenture, incorporated by reference as an exhibit to the Registration Statement, entered into between the Company and The Bank of New York Mellon Trust Company, N.A., as trustee (the “Trustee”), on April 2, 2013, as supplemented by a seventh supplemental indenture, filed as Exhibit 4.1 to the Company’s Current Report on Form 8-K filed with the Commission on June 4, 2024, to be entered into between the Company and the Trustee (collectively, the “Indenture”).
As counsel to the Company, we have participated in the preparation of the Registration Statement and the Prospectus and have examined the originals or copies of the following:
(i)The Articles of Amendment and Restatement of the Company, certified as of the date hereof by an officer of the Company;


dechertlogo.jpg
Main Street Capital Corporation
June 4, 2024
Page 2

(ii)The Amended and Restated Bylaws of the Company, certified as of the date hereof by an officer of the Company;
(iii)A Certificate of Good Standing with respect to the Company issued by the State Department of Assessments and Taxation of the State of Maryland as of a recent date;
(iv)The resolutions of the board of directors of the Company, or a duly authorized committee thereof, relating to, among other things, (a) the authorization and approval of the preparation and filing of the Registration Statement, (b) the authorization, execution and delivery of the Indenture; and (c) the authorization, issuance and sale of the Notes, certified as of the date hereof by an officer of the Company;
(v)The Underwriting Agreement;
(vi)The Indenture; and
(vii)A specimen copy of the form of the Notes to be issued pursuant to the Indenture in the form attached to the Indenture.
With respect to such examination and our opinion expressed herein, we have assumed, without any independent investigation or verification, (i) the genuineness of all signatures of persons signing all documents submitted to us for examination in connection with which this opinion is rendered, (ii) the legal capacity of all natural persons, (iii) the authenticity of all documents submitted to us as originals, (iv) the conformity to original documents of all documents submitted to us as conformed or reproduced copies and the authenticity of the originals of such copied documents, (v) the legal power and authority of all persons signing on behalf of the parties to all such documents (other than the Company), (vi) the due authorization, execution and delivery of all documents by the parties thereto (other than the Company), (vii) that all certificates issued by public officials have been properly issued, (viii) that the Indenture will be a valid and legally binding obligation of the parties thereto (other than the Company), (ix) the accuracy and completeness of all corporate records made available to us by the Company, and (x) that at the time of issuance of the Notes, after giving effect to such issuance, the Company will be in compliance with Section 18(a)(1)(A) of the Investment Company Act of 1940, as amended (the “1940 Act”), giving effect to Section 61(a) of the 1940 Act. We also have assumed without independent investigation or verification the accuracy and completeness of all corporate records made available to us by the Company.
As to certain matters of fact relevant to the opinions in this opinion letter, we have relied upon certificates and/or representations of officers of the Company. We have also relied on certificates and confirmations of public officials. We have not independently established the facts, or in the case of certificates or confirmations of public officials, the other statements, so relied upon.
This opinion letter is limited to the contract laws of the State of New York, and, to the extent relevant to the opinion expressed herein, the applicable provisions of the Maryland General Corporation


dechertlogo.jpg
Main Street Capital Corporation
June 4, 2024
Page 3

Law, in each case as in effect on the date hereof, and we express no opinion with respect to any other laws of such jurisdictions or the laws of any other jurisdictions. Without limiting the preceding sentence, we express no opinion with respect to the “blue sky” or other securities laws or regulations of the State of Maryland or any other jurisdiction or as to any state securities or broker dealer laws or regulations thereunder relating to the offer, issuance and sale of the Notes. This opinion letter has been prepared, and should be interpreted, in accordance with customary practice followed in the preparation of opinion letters by lawyers who regularly give, and such customary practice followed by lawyers who on behalf of their clients regularly advise opinion recipients regarding, opinion letters of this kind.
Based upon and subject to the limitations, exceptions, qualifications and assumptions set forth in this opinion letter, we are of the opinion that, when the Notes are duly executed and delivered by duly authorized officers of the Company and duly authenticated by the Trustee, all in accordance with the provisions of the Indenture, and delivered to the underwriters against payment therefor in accordance with the terms of the Underwriting Agreement, the Notes will constitute valid and legally binding obligations of the Company, enforceable against the Company in accordance with their terms, except as such enforceability may be limited by applicable bankruptcy, insolvency, reorganization, receivership, moratorium, fraudulent conveyance, and other similar laws affecting the rights and remedies of creditors generally and by general principles of equity (including without limitation the availability of specific performance or injunctive relief and the application of concepts of materiality, reasonableness, good faith and fair dealing), regardless of whether considered in a proceeding at law or in equity.
The opinions expressed in this opinion letter (a) are strictly limited to the matters stated in this opinion letter, and without limiting the foregoing, no other opinions are to be implied and (b) are only as of the date of this opinion letter, and we are under no obligation, and do not undertake, to advise the Company or any other person or entity either of any change of law or fact that occurs, or of any fact that comes to our attention, after the date of this opinion letter, even though such change or such fact may affect the legal analysis or a legal conclusion in this opinion letter.
We hereby consent to the filing of this opinion as an exhibit to the Company’s Current Report on Form 8-K filed with the Commission June 4, 2024 and to the reference to our firm in the “Legal Matters” section in the Prospectus. We do not admit by giving this consent that we are in the category of persons whose consent is required under Section 7 of the Securities Act or the rules and regulations of the Commission thereunder.

Very truly yours,

/s/ Dechert LLP