Exhibit 23 CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM We consent to the incorporation by reference in Registration Statements No. 333-60998, 333-61102, 333-104422 and 333-106059 of James Monroe Bancorp, Inc. on Forms S-8 of our report, dated January 27, 2006, relating to the consolidated balance sheets of James Monroe Bancorp, Inc. and Subsidiaries as of December 31, 2005 and 2004, and the related consolidated statements of income, changes in stockholders' equity and cash flows for the years ended December 31, 2005, 2004 and 2003 appearing in this Form 10-K of James Monroe Bancorp, Inc. for the year ended December 31, 2005. /s/ Yount, Hyde & Barbour, P.C. Winchester, Virginia March 17, 2006