Form: S-3/A

Registration statement for specified transactions by certain issuers

December 8, 2011

Exhibit 23.1

CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM

Dynex Capital, Inc.

Glen Allen, Virginia

We hereby consent to the incorporation by reference in the Prospectus constituting a part of this Registration Statement of our reports dated March 16, 2011, relating to the consolidated financial statements and the effectiveness of internal control over financial reporting of Dynex Capital, Inc. (the “Company”) appearing in the Company’s Annual Report on Form 10-K for the year ended December 31, 2010.

We also consent to the reference to us under the caption “Experts” in the Prospectus.

/s/ BDO USA, LLP

Richmond, Virginia

December 8, 2011