QuickLinks -- Click here to rapidly navigate through this document

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-194943) on Form S-8 and (No. 333-207088) on Form S-3 of 2U, Inc. and subsidiaries of our report dated March 10, 2016, with respect to the consolidated balance sheets of 2U, Inc. and subsidiaries as of December 31, 2015 and 2014, and the related consolidated statements of operations, changes in stockholders' equity (deficit), and cash flows for each of the years in the three-year period ended December 31, 2015, and the effectiveness of internal control over financial reporting as of December 31, 2015, which reports appear in the December 31, 2015 annual report on Form 10-K of 2U, Inc. and subsidiaries.

|  | /s/ KPMG LLP

McLean, Virginia
March 10, 2016

QuickLinks

EXHIBIT 23.1

Consent of Independent Registered Public Accounting Firm