Exhibit 5.1

Steven M. Przesmicki
+1 858 550 6070
przes@cooley.com
March 8, 2021
Longboard Pharmaceuticals, Inc.
6154 Nancy Ridge Drive
San Diego, California 92121
Ladies and Gentlemen:
You have requested our opinion, as counsel to Longboard Pharmaceuticals, Inc., a Delaware corporation (the “Company”), in connection with the filing by the Company of a Registration Statement (File No. 333-253329) on Form S-1 (the “Registration Statement”) with the Securities and Exchange Commission, including a related prospectus filed with the Registration Statement (the “Prospectus”), covering an underwritten public offering of up to 5,750,000 shares (the “Shares”) of the Company’s common stock, par value $0.0001, which includes up to 750,000 Shares that may be sold pursuant to the exercise of an option to purchase additional shares.
In connection with this opinion, we have (i) examined and relied upon (a) the Registration Statement and the Prospectus, (b) the Company’s Certificate of Incorporation and Bylaws, each as currently in effect, (c) the Company’s Amended and Restated Certificate of Incorporation and Amended and Restated Bylaws filed as Exhibits 3.2 and 3.4, respectively, to the Registration Statement which are to be in effect in connection with the closing of the offering contemplated by the Registration Statement, and (d) originals or copies certified to our satisfaction of such records, documents, certificates, memoranda and other instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below, and (ii) assumed that the Shares will be sold at a price established by the Board of Directors of the Company or a duly authorized committee thereof. We have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, the conformity to originals of all documents submitted to us as copies, the accuracy, completeness and authenticity of certificates of public officials, and the due authorization, execution and delivery of all documents by all persons other than the Company where authorization, execution and delivery are prerequisites to the effectiveness of such documents. As to certain factual matters, we have relied upon a certificate of an officer of the Company and have not independently verified such matters.
Our opinion is expressed only with respect to the General Corporation Law of the State of Delaware. We express no opinion to the extent that any other laws are applicable to the subject matter hereof and express no opinion and provide no assurance as to compliance with any federal or state securities law, rule or regulation.
On the basis of the foregoing, and in reliance thereon, we are of the opinion that the Shares, when sold and issued against payment therefor as described in the Registration Statement and the Prospectus, will be validly issued, fully paid and non-assessable.
Cooley LLP 4401 Eastgate Mall San Diego, CA 92121
t: (858) 550-6000 f: (858) 550-6420 cooley.com