EXHIBIT 23.1
Consent of Independent Registered Public Accounting Firm
The Board of Directors
2U, Inc.:
We consent to the incorporation by reference in the registration statements (No. 333-227546) on Form S-3 and (Nos. 333-194943 and 333-221964) on Form S-8 of 2U, Inc. of our reports dated February 27, 2020, with respect to the consolidated balance sheets of 2U, Inc. and subsidiaries (the Company) as of December 31, 2019 and 2018, the related consolidated statements of operations and comprehensive loss, changes in stockholders’ equity, and cash flows for each of the years in the three-year period ended December 31, 2019, and the related notes and financial statement Schedule II-Valuation and Qualifying Accounts (collectively, the consolidated financial statements), and the effectiveness of internal control over financial reporting as of December 31, 2019, which reports appear in the December 31, 2019 annual report on Form 10-K of 2U, Inc.
Our report dated February 27, 2020 on the consolidated financial statements refers to a change in the method of accounting for revenues due to the adoption as of January 1, 2018 of Financial Accounting Standards Board (FASB) Accounting Standards Codification (ASC) Topic 606, Revenue from Contracts with Customers and to a change in the method of accounting for leases as of January 1, 2019 due to the adoption of Financial Standards Board (FASB) Accounting Standards Codification (ASC) Topic 842, Leases.
Our report dated February 27, 2020 on the effectiveness of internal control over financial reporting as of December 31, 2019, contains an explanatory paragraph that states that the Company acquired Trilogy Education Services, Inc. (Trilogy) on May 22, 2019, management excluded Trilogy’s internal control over financial reporting from its assessment of the effectiveness of the Company’s internal control over financial reporting, and that our audit of internal control over financial reporting of the Company also excluded an evaluation of the internal control over financial reporting of Trilogy.

|  | /s/ KPMG LLP

McLean, Virginia
February 27, 2020