EX-23.1 4 d90970dex231.htm EX-23.1

Exhibit 23.1

Consent of Independent Registered Public Accounting Firm

We consent to the incorporation by reference in the following Registration Statements:

| 1) | Registration Statement (Form S-8 No. 333-287667) pertaining to the United Bankshares, Inc. 2025 Equity Incentive Plan

| 2) | Registration Statement (Form S-8 No. 333-238788) pertaining to the 2020 Long-Term Incentive Plan of United Bankshares, Inc.,

| 3) | Registration Statement (Post-Effective Amendment No. 1 to Form S-4 on Form S-8 No. 333-235944) pertaining to the 250,000 shares of common stock of United Bankshares, Inc. issuable under options assumed by United Bankshares, Inc. pursuant to the Carolina Financial Corporation 2013 Equity Incentive Plan and the First South Bancorp, Inc. 2008 Equity Incentive Plan,

| 4) | Registration Statement (Post-Effective Amendment No. 1 to Form S-4 on Form S-8 No. 333-258967) pertaining to the 587,000 shares of common stock of United Bankshares, Inc. issuable under options assumed by United Bankshares, Inc. pursuant to the Community Bankers Trust Corporation 2009 Stock Incentive Plan and the Community Bankers Trust Corporation 2019 Stock Incentive Plan,

| 5) | Registration Statement (Form S-8 No. 333-212766) pertaining to the 2016 Long-Term Incentive Plan of United Bankshares, Inc.,

| 6) | Registration Statement (Form S-8 No. 333-176658) pertaining to the 2011 Long-Term Incentive Plan of United Bankshares, Inc.,

| 7) | Registration Statement (Form S-8 No. 33-32522) pertaining to the United Bankshares, Inc. Savings and Stock Investment Plan, and

of our reports dated February 27, 2026, with respect to the consolidated financial statements of United Bankshares, Inc. and subsidiaries, and the effectiveness of internal control over financial reporting of United Bankshares, Inc. and subsidiaries, included in this Annual Report (Form 10-K) of United Bankshares, Inc. for the year ended December 31, 2025.

/s/ Ernst & Young LLP
Charleston, WV
February 27, 2026