Attached files

file filename
S-1 - S-1 - FIRST COMMUNITY CORP /SC/a2209640zs-1.htm
EX-23.1 - EX-23.1 - FIRST COMMUNITY CORP /SC/a2209640zex-23_1.htm

QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1

Nelson
Mullins

Nelson Mullins Riley & Scarborough LLP
Attorneys and Counselors at Law
104 South Main Street / Ninth Floor / Greenville, SC 29601
Tel: 864.250.2300 Fax: 864.232.2925
www.nelsonmullins.com

May 15, 2012

First Community Corporation
5455 Sunset Boulevard
Lexington, SC 29072

        Re: First Community Corporation Registration Statement on Form S-1

Ladies and Gentlemen:

        We are acting as special counsel to First Community Corporation, a South Carolina corporation (the "Company"), in connection with the proposed registration by the Company of up to an aggregate of $14,375,000 of common stock of the Company, par value $1.00 per share (the "Shares"), pursuant to a Registration Statement on Form S-1, originally filed with the Securities and Exchange Commission (the "Commission") on May 15, 2012 under the Securities Act of 1933, as amended (the "Securities Act") (such Registration Statement, as amended or supplemented, is hereinafter referred to as the "Registration Statement"). All of the Shares to be registered pursuant to the Registration Statement are being offered by the Company.

        In that connection, we have examined originals, or copies certified or otherwise identified to our satisfaction, of such documents, corporate records and other instruments as we have deemed necessary for the purposes of this opinion, including (i) the Company's Amended and Restated Articles of Incorporation, (ii) the Company's Bylaws; and (iii) certain resolutions, minutes, and records of the corporate proceedings of the Company with respect to the issuance and sale of the Shares.

        For purposes of this opinion, we have assumed the authenticity of all documents submitted to us as originals, the conformity to the originals of all documents submitted to us as copies and the authenticity of the originals of all documents submitted to us as copies. We have also assumed the legal capacity of all natural persons, the genuineness of the signatures of persons signing all documents in connection with which this opinion is rendered, the authority of such persons signing on behalf of the parties thereto other than the Company, and the due authorization, execution and delivery of all documents by the parties thereto other than the Company. We have not independently established or verified any facts relevant to the opinions expressed herein, but have relied upon statements and representations of officers and other representatives of the Company and others.

With offices in the District of Columbia, Florida, Georgia, Massachusetts, North Carolina, South Carolina, Tennessee and West Virginia


First Community Corporation
May 15, 2012
Page 2

        Based upon and subject to the foregoing qualifications, assumptions and limitations and the further limitations set forth below, we are of the opinion that the Shares will be duly authorized, and, when the Registration Statement becomes effective under the Securities Act, and when appropriate certificates representing the Shares are duly countersigned and registered by the Company's transfer agent/registrar and delivered to the Company's underwriters against payment of the agreed consideration therefor in accordance with the Underwriting Agreement, the Shares will be validly issued, fully paid and nonassessable.

        Our opinion expressed above is subject to the qualification that we express no opinion as to the applicability of, compliance with, or effect of any laws other than the South Carolina Business Corporation Act (including the statutory provisions, all applicable provisions of the South Carolina Constitution and reported judicial decisions interpreting those laws).

        We hereby consent to the filing of this opinion with the Commission as Exhibit 5.1 to the Registration Statement. We also consent to the reference to our firm under the heading "Legal Matters" in the Registration Statement. In giving this consent, we do not thereby admit 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. This opinion and consent may be incorporated by reference in a subsequent registration statement on Form S-1 filed pursuant to Rule 462(b) under the Securities Act with respect to the registration of additional securities for sale in the offering contemplated by the Registration Statement and shall cover such additional securities, if any, registered on such subsequent registration statement.

        We do not find it necessary for the purposes of this opinion, and accordingly we do not purport to cover herein, the application of the securities or "Blue Sky" laws of the various states to the issuance and sale of the Shares.

        This opinion is limited to the specific issues addressed herein, and no opinion may be inferred or implied beyond that expressly stated herein. We assume no obligation to revise or supplement this opinion should the South Carolina Business Corporation Act be changed by legislative action, judicial decision or otherwise.

                      Sincerely,

                      NELSON MULLINS RILEY & SCARBOROUGH LLP




QuickLinks