QuickLinks -- Click here to rapidly navigate through this document

Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

We consent to the incorporation by reference in the Registration Statements on Form S-8 (No. 333-119559, No. 333-123716, No. 333-129669, No. 333-142707, No. 333-150753, No. 333-159042, No. 333-161065, No. 333-166546), and No. 333-173923 pertaining to the 2004 Equity Incentive Plan, 2004 Employee Stock Purchase Plan, Shares Acquired Under Written Compensation Agreements and 2008 New Employee Equity Incentive Plan of Theravance, Inc. and the Registration Statement on Form S-3 (No. 333-160761) and related Prospectus of Theravance, Inc. of our reports dated February 27, 2012, with respect to the consolidated financial statements of Theravance, Inc. and the effectiveness of internal control over financial reporting of Theravance, Inc., included in this Annual Report (Form 10-K) for the year ended December 31, 2011.

/s/ ERNST & YOUNG LLP

Redwood City, California
February 27, 2012

QuickLinks

Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM