Exhibit 14

Code of Ethics

MainStreet BankShares, Inc. (the Company) is committed to the goal of the highest
standards of ethical corporate and personal conduct. The Company can achieve this goal only through the individual and collective efforts of our directors, officers and employees.

Corporate Conduct

The Companys activities should earn the confidence and trust of our
various stakeholders  our customers, shareholders, employees, and the general public.

Our corporate code of ethics is as follows:



| |  | The Company will actively seek to comply with all laws or regulations in the conduct of its business.
|- |  | -----------------------------------------------------------------------------------------------------



| |  | The Company will provide pertinent, accurate and complete information to authorized auditors or regulatory agencies.
|- |  | --------------------------------------------------------------------------------------------------------------------



| |  | The Company will endeavor to keep accurate books and records, record all transactions honestly and correctly and provide full, fair, accurate, timely and understandable disclosure
in publicly available reports and communications.
|- |  | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| |  | The Company will maintain standards and procedures to reasonably safeguard the legitimate confidentiality of information pertaining to customers and employees.
|- |  | ---------------------------------------------------------------------------------------------------------------------------------------------------------------



| |  | The Company will conduct its business in fair and open competition and will not enter into illegal arrangements with competitors affecting pricing or marketing policies.
|- |  | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Personal Conduct

Because the Company is judged by the collective performance and public perception of its employees, each of us has a responsibility to act in a manner that merits public trust and confidence. Specific guidelines, regulations, and procedures
are contained in the Statement of Business Practices related to our specific duties. Basic standards of personal business ethics can be stated as follows:



| |  | We must not take any action, either personally or on behalf of the Company, that will violate any law or regulation affecting the Companys business.
|- |  | -----------------------------------------------------------------------------------------------------------------------------------------------------



| |  | We must perform our assigned duties honestly and ethically, with due care, and to the best of our ability and in the best interest of the Company, its stockholders, and its
customers.
|- |  | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| |  | We must not attempt to exercise undue influence over the conduct or report of any external, internal or other audit.
|- |  | --------------------------------------------------------------------------------------------------------------------



| |  | We must avoid all circumstances that could produce conflicts or the appearance of conflicts between our personal interests and those of the Company and report to our organizational
superior any actual or potential conflict of interest that develops.
|- |  | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| |  | We must respect the confidentiality of information obtained in the course of business and use it only for the legitimate purposes of the Company.
|- |  | -------------------------------------------------------------------------------------------------------------------------------------------------



| |  | We must exercise absolute candor and honesty in providing facts and information requested by organizational superiors or other authorized officials or required for the
Companys business and, within our job responsibilities, provide constituents having the right to know with information that is relevant, accurate and complete.
|- |  | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| |  | We must responsibly use all Company assets and resources entrusted to us.
|- |  | -------------------------------------------------------------------------



---

| |  | We must not use corporate resources or our position in pursuit of personal interests or in violation of any law or regulation.
|- |  | ------------------------------------------------------------------------------------------------------------------------------



| |  | We must promptly report all acts known or suspected to be violations of the Code of Ethics and Statement of Business Practices or of the law applicable to the Companys
business in accordance with established procedures and cooperate, as directed by a duly constituted authority, in any investigation of reported or suspected violations.
|- |  | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| |  | We must actively promote ethical behavior among fellow employees.
|- |  | -----------------------------------------------------------------



| |  | We are accountable for adhering to this Code of Ethics and the Statement of Business Practices.
|- |  | -----------------------------------------------------------------------------------------------

Statement of Business Practices

The following Statement of Business Practices (Statement) seeks
to provide practical guidance for and application of the Companys Code of Ethics (Code). This Statement reflects the corporate policy of the Company as well as the mandates of certain laws and regulations and shall govern the
actions of the Companys officers and employees (and directors where indicated). In the discretion of management, this Statement may be supplemented by other corporate policies, not in conflict with these provisions.

Administration

Every new employee will receive a
copy of the Code of Ethics and Statement of Business Practices and will acknowledge acceptance of its terms as a condition of employment. This signed acceptance will be maintained in the employees personnel file. Each officer and director will
be required to complete and sign an annual affirmation statement attesting to his or her compliance with the Statement.

Any apparent or suspected
violation of the Code of Ethics or Statement of Business Practices must be promptly brought to the attention of the President/CEO or Chief Financial Officer or otherwise in accordance with reporting procedures established by the Board of Directors.
Upon determination that a violation has occurred, appropriate disciplinary action will be taken through the normal supervisory process.

Violations of
provisions of the Statement of Business Practices are grounds for disciplinary action ranging from reprimand to dismissal. Internal disciplinary action would be in addition to any civil or criminal action that may result.

The Human Resources Committee (Committee) of the Board of Directors shall have the authority to review, and, upon full disclosure of the facts, approve
exceptions to this policy. In addition, the Committee shall have the power to amend this policy and approve any and all changes proposed. All approved changes or amendments by the Committee shall be noted in the minutes of the Committee, reflected
in subsequent copies of this Statement, and reported to the Board of Directors of MainStreet BankShares, Inc.

Confidential Information

Corporate Information

All information, financial or otherwise, about the Company, its shareholders, or employees is to be considered confidential (not available to the public), unless it has been published in reports to our shareholders or otherwise made
available to the public in accordance with applicable disclosure laws or is otherwise authorized by the Company for disclosure. Any questions concerning the disclosure of confidential information should be addressed to the President/CEO or the Chief
Financial Officer and if necessary reviewed by the Companys External Counsel prior to disclosure.

Customer
Information

The expectation of privacy is fundamental to our banking relationships with our customers. Confidential information obtained from a
customer, such as account balances, financial condition, anticipated changes in management, business plans and projections etc. must never be divulged to anyone other than the relevant customer or to employees or agents of the Company (unless such
disclosure is specifically permitted by the customer or legally required). Such information may be communicated to other Company personnel or agents only for legitimate use in connection with their Company responsibilities.



---

Personal Use of Confidential Information

Confidential information must not be used for personal interest or gain or for the benefit of any subsequent employer. The use or disclosure of such information can also
result in civil and criminal liability, both for the individual concerned and the Company, or for a former employee of the Company and a subsequent employer, as the case may be.

Release of Information

Requests for
information regarding current or former employees should be referred to the President/CEO or Chief Financial Officer for handling under approved release rules. Inquiries regarding customer credit and account information must be referred to
authorized personnel. Other information concerning a customer, shareholder, or a particular customer, business or company transaction may be disclosed externally only in accordance with approved Company policies or as required by law. Information
regarding the Company (other than approved advertising) may be publicly disclosed only in accordance with Company-approved public disclosures. No information should be provided to governmental or other entities unless pursuant to an approved
response to legal process, the information has been appropriately requested by a regulatory examiner in the course of an examination, and/or the release of information has been authorized under normal operating procedures.

Bank Examinations

As a matter of
law, the contents and results of bank regulatory examinations must be held in strictest confidence and may not be publicly divulged or discussed. Company personnel will cooperate fully with requests for information made by regulatory examiners as
required by law.

Conflicts of Interest

Avoidance of Conflicts

Each
director, officer, and employee of the Company has a duty to conduct his or her personal affairs in a manner that avoids as much as possible both actual and apparent conflicts with the business interest of the Company. The Company recognizes,
however, that it is not possible to avoid all conflicts of interest or potential situations where conflicts may arise. A conflict of interest exists or may exist whenever directors and employees or their relatives have an interest in any entity or
matter that may be affected by a decision of the Company, in which the Companys interest may be different or which may affect the judgment that such director, officer or employee may have to exercise in the discharge of his/her
responsibilities to the Company, or may be perceived by the public as doing so. Employees and officers should be alert to and promptly disclose to in writing to their immediate supervisor, with a copy to the President/CEO or Chief Financial Officer,
all actual or potential conflicts of interest. Directors must disclose such actual or potential conflicts to all other members of the Board. Such disclosure must disclose the nature of the conflict, the circumstances giving rise to the conflict and
the interests of the employee, relative or entity involved. No employee, officer or director may influence or participate in any decision or action of the Company in which there is an actual or potential conflict of interest.

Employees may not process or approve extensions of credit or overdrafts or waive service charges or late fees for themselves or their relatives. No director, officer, or
employee may participate in any way in the approval process for any extensions of credit to any business in which the director, officer, or employee, or any of their relatives, has a material financial interest.

Gifts

To avoid possible conflicts
of interest and because it is potentially illegal under the Bank Bribery Act to accept anything of value from a customer in connection with any transaction or business of the Company, directors, officers, employees, and members of their households
are not permitted to solicit or accept gifts (either for themselves or others) from any existing or prospective customer or supplier unless it has been approved in advance by a senior officer of the Company with authority to do so or is authorized
by established Company policy below. A gift is regarded as any type of gratuity, favor, service, discount or price concession, legacy (except from a relative), fee, compensation or anything of monetary value. Directors, officers, or employees who
are unsure as to whether a gift may be a violation of law and/or these standards should seek guidance from the President/CEO. Prohibited gifts should be returned to the sender. The only exceptions to this policy are as follows:



| |  | Gifts based on obvious family and personal relationships where it is clear that it is those relationships which are the sole motivating factor;
|- |  | -----------------------------------------------------------------------------------------------------------------------------------------------



| |  | Meals, refreshments, travel arrangements, accommodations, or entertainment of reasonable value and in the course of bona fide business discussions so long as these expenses would be
paid by the Company as a reasonable business expense. Any travel arrangements and accommodations offered to employees and officers from any source must be approved by the President/CEO or Chief Financial Officer in advance or, in the case of a
director, by the Human Resources Committee of the Board, if offered to the director by a party having a present or known possible business or employment relationship with the Company. Lavish or extravagant entertainment should not be accepted unless
reimbursement is made to the donor;
|- |  | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



---

| |  | Gifts not exceeding $100 in value received at holiday time or on special occasions that create no sense of obligation. Purchasing agents or other employees involved in purchasing
should refuse gifts of any nature from existing or prospective suppliers;
|- |  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| |  | Unsolicited advertising or promotional materials of reasonable value that are generally available to the public;
|- |  | ----------------------------------------------------------------------------------------------------------------



| |  | Discounts or rebates on merchandise or services that do not exceed those available to other customers;
|- |  | ------------------------------------------------------------------------------------------------------



| |  | Fees or other compensation received from an organization in which membership or an official position held is approved by the Company, subject to the prior approval of the
President/CEO or Chief Financial Officer or the Human Resources Committee of the Board of Directors;
|- |  | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| |  | Civic, charitable, educational or religious organizational awards for recognition of service and accomplishments; and
|- |  | ---------------------------------------------------------------------------------------------------------------------



| |  | Such other exceptions as may be adopted in writing on a case-by-case basis by the President/CEO, Chief Financial Officer, or the Human Resource Committee of the Board of Directors.
|- |  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

An employee must immediately report to his or her supervisor any offer of anything of value for him or herself or others that is not clearly
within what is permitted in these Standards of Business Practices or that he/she believes is an attempt to improperly influence them in the performance of their duties.

No individual representing the Company or member of his/her immediate family may extend a gift to any existing or prospective customers or suppliers that would be unacceptable for such individual or family member to
receive from the customer or supplier under this policy.

Material Management of Financial Interests

No director, officer or employee shall make or approve any loan by the Company or any purchase by the Company or exercise any discretionary authority whatsoever with
respect to any other transaction or course of dealing between the Company and any entity in which he or she or his/her relatives have a significant management or financial interest. A relative is defined as a spouse, parent, minor or adult child, or
sibling by blood, marriage, or adoption. In all such situations the director, officer, or employee must report the interest to his/her superior and must either disqualify him or herself from any participation in the decision to be made, or, in the
alternative, relinquish the interest. A material financial interest is defined as a 10% or greater ownership interest in a business.

In order to help
avoid potential conflicts of interest, all officers and employees are required to seek prior approval from the President/CEO prior to assuming any management position or acquiring any material financial interest in an entity other than the Company.

Outside Activities

Fiduciary and Other Appointments

No officer or employee shall act solely or in conjunction with anyone else in a
fiduciary capacity, including as the executor of an estate, except (1) for a relative, or (2) with the consent of the President/CEO. Employees shall not accept an appointment from or for the benefit of a customer (other than a relative)
under a power of attorney, or as trustee where a customer is the grantor or a beneficiary, or manage or participate or influence the management all or any part of a customers business affairs or assets (including but not limited to the
acquisition or disposition thereof, except in exercising the Companys interest therein as lender), without prior written approval from the President/CEO. Such approval shall be maintained in the officers or employees employment
file.

In all instances where an officer or employee has knowledge that he or she has been named in a fiduciary capacity, solely or in conjunction with
someone else, or that he or she has been named as a beneficiary under the will of anyone other than a relative, he or she should report such fact promptly to the Companys President/CEO.

Organizational Directorships and Trusteeships

The Company recognizes the value to itself, the individual, and to outside organizations (particularly to civic, charitable or tax exempt organizations), of having the Companys directors, officers, and employees
serve as directors or trustees of outside organizations and has no absolute policy prohibiting such outside trusteeships or directorships where the circumstances are appropriate, no real or apparent conflict of interest is involved and the position
does not interfere with an employee or officers fulfillment of his responsibilities. However, with respect to officers and employees, all new outside directorships and trusteeships and any resulting compensation shall be approved in writing by
the President/CEO prior to acceptance. Such approval shall be maintained in the officers or employees employment file.



---

Outside Employment or Business Activity

In no instance shall an officer or employee be employed by, or engage in, any business whose products or services compete directly or indirectly with the Company. No
outside employment or business may interfere, to any extent, with the officer or employees ability to devote his full time to the business of the Company. Officers and employees may not utilize confidential Company information or trade on
their position with the Company in seeking or carrying on any outside employment or business activity. Outside employment or business activity must be reported to and approved by the President/CEO prior to acceptance. Such documentation shall be
maintained in the officers or employees employment file.

Community Involvement

The Company encourages its officers and employees to participate in civic and charitable activities. Any activities, or assignments within such activities, that are
likely to encroach on working time, interfere with regular duties, adversely affect the quality of work performed, involve significant use of the Companys equipment, supplies, or facilities, imply sponsorship or support of the Company on
behalf of the organization, or potentially adversely affect the reputation of the Company, must be approved by the President/CEO prior to acceptance. Such approval shall be maintained in the officers or employees employment file.

Political Activity

The Company encourages it officers and employees to exercise, as individuals, the prerogatives of good citizenship and to participate, as individuals, directly or indirectly in all elective processes at every level of government. Officers
and employees who engage in political activities do so as individuals and not as representatives of the Company. The endorsement of any candidate, party, or cause by an officer or employee or such officer or employees participation in any
political or governmental office or campaign must clearly be on an individual basis with no actual or implied imputation of endorsement by the Company or other connection to the Company. Under no circumstance shall an officer or employee capitalize
on his or her association with the Company for political purposes or use the Company name or letterhead in connection with a political campaign. Written approval must be obtained from the President/CEO prior to acceptance of any nomination or
appointment to public office. Such approval shall be maintained in the officers or employees employment file.

Personal
Finance

Just as the Companys reputation rests in part on the intelligent management of its customers funds, so are its employees expected
to manage their personal finances in an intelligent, prudent and honest manner. Financial activities that pose excessive monetary or credit risk or that might otherwise reflect adversely on the Company should be avoided.

Investments

Subject to the other
provisions of this Statement, employees are permitted to make personal investments in corporate stocks, bonds, real estate, money market instruments, or other securities, including those issued by the Company but, except for securities actively
traded in a public market and acquired by the employee in such market employees must receive prior approval for any investment in actual or prospective customers of the Company as provided in the next section. No investments should be permitted to
influence an officers or employees actions in conducting Company business.

Securities of Customers and
Suppliers

Employees should not invest in securities, enterprises or other activities of customers and suppliers that are not available to or on terms
more favorable than are available to the public without the prior written approval of the President/CEO. Such approval shall be maintained in the officers or employees employment file. No officer or employee or relative shall use
confidential information not available to the general public learned as a result of his or her association with the Company to purchase or sell or influence others to purchase or sell the investment securities of any customer or supplier.

Purchases and Sales of Securities

No director, officer, or employee, or a member of their immediate family, shall make use of any information which comes to his or her attention as a result of his or her position with the Company to purchase stock in
any company, including Company stock, or in advising others to buy or sell such stock, until such information has been made available to the general public and absorbed into the public markets. Any director, officer, or employee with questions
regarding this policy should seek guidance from the Companys External Counsel.



---

Abuse of MainStreet BankShares, Inc.s Subsidiaries Accounts

All personal accounts and financial relationships with the Company shall be handled in a responsible manner. Intentional, repeated, or excessive
overdrafts or delinquencies shall be avoided, as should any activity which resembles check kiting. No corporate accounts shall be used for any personal purposes. All business expenses shall be handled in accordance with the Companys written
policies.

Borrowing

Employees should not borrow from or lend personal funds to other employees, customers, or suppliers. Employees may borrow from the Company according to established policies and procedures, or from any other banks or companies normally
engaged in the business of lending, on terms offered to other customers under similar circumstances and without special concessions.

Sale of Purchase of Securities or Other Property

No director, officer, employee, members of their immediate
families, their related interests, or their agents, shall be an eligible purchaser of property acquired by the Company through repossession, except at a public sale.

Business Conduct

Compliance With Laws

The Company intends in the conduct of its business to obey all applicable laws and comply with relevant regulations. Where the requirements of such laws or regulations
are unclear, the advice of the President/CEO or Companys External Counsel should be sought.

Non-Discrimination

The Company is firmly committed to nondiscrimination and equal opportunity. All employees and applicants for employment, and existing and prospective
customers and suppliers, shall be treated without discrimination and harassment on the basis of race, color, religion, creed, gender, national origin, age, veterans status, or disability.

Improper Payments

The use of the
Companys funds for any unlawful purposes or in violation of stated policies is prohibited. No bribes, kickbacks, or similar remuneration or consideration of any kind are to be given or offered to any individual, organization, government,
political party, or other entity or representative thereof, for any reason whatsoever. An employee or representative of the Company possessing knowledge of such illegal payments, or of any unrecorded funds or false entries maintained for the purpose
of facilitating such payments, must immediately notify the President/CEO or Chief Financial Officer or follow such other reporting procedure as the Board of Directors may establish.

Fair Competition

In conducting its
business, the Company engages in fair and ethical competition. It is the strict policy of the Company that all officers and employees comply with the spirit and letter of antitrust laws in the conduct of their duties and business activities. The
Company repudiates all illegal practices in conducting its business.

Bank Property

Employees may not use Company supplies, equipment or property for their own personal purposes without the prior written approval of their immediate supervisor. In
addition, Company equipment may not be removed from the workplace without prior authorization from the appropriate Senior Manager.

Lobbying

Because of the complexity of the laws dealing with lobbying, all planned contacts with members of the state and federal
legislatures on matters relating to the Company or to banking must have the prior approval of the Chief Executive Officer or the Company or his designee.



---

I have received the Code of Ethics/Statement of Business Practices. I have read it and understand it and
agree to abide by the policy.



|           |  |  |  |      |  | 
|---------- |  |  |  | ---- |  | 
|Signature  |  |  |  | Date |  | 
|           |  |  | 
|Print Name |  |  |  |      |  |