<PAGE>

                                                                      Exhibit 14

                        TRI-COUNTY FINANCIAL CORPORATION

                                 CODE OF ETHICS

GENERAL PHILOSOPHY

The honesty, integrity and sound judgment of our senior executives, financial
officers, directors and employees is essential to the reputation and success of
Tri-County Financial Corporation and Community Bank of Tri-County (collectively,
the "Company").

Throughout this Code of Ethics, the term "Company" refers to Tri-County
Financial Corporation and/or the subsidiary in which an individual works or
serves as a director, depending on context.

This Code of Ethics governs the actions and working relationships of senior
executives, financial officers, directors and employees of the Company with
current and potential customers, consumers, fellow employees, competitors,
government and self-regulatory organizations, the media, and anyone else with
whom the Company has contact. These relationships are essential to the continued
success of the Company as a financial services provider.

This Code of Ethics:

     -    Requires the highest standards for honest and ethical conduct,
          including proper and ethical procedures for dealing with actual or
          apparent conflicts of interest between personal and professional
          relationships.

     -    Requires full, fair, accurate, timely and understandable disclosure in
          the periodic reports filed with, or submitted to the Company with
          governmental and regulatory agencies and in other public
          communications made by the Company.

     -    Requires compliance with applicable laws, rules and regulations.

     -    Addresses potential or apparent conflicts of interest and provides
          guidance on how to communicate those conflicts to the Company.

     -    Addresses misuse or misapplication of the Company's property and
          corporate opportunities.

     -    Requires the highest level of confidentiality and fair dealing within
          and without the Company environment.

     -    Requires reporting of any illegal behavior.

     -    Requires accountability for adherence to the Code.

<PAGE>

     -    Addresses the prompt internal reporting of violations of the Code to
          the Company.

IDENTIFICATION OF SENIOR EXECUTIVES, FINANCIAL OFFICERS AND DIRECTORS

Certain portions of this Code of Ethics may apply specifically to the Company's
senior executives, financial officers and directors. These include all officers
with the title of President and Executive Vice President as well as the
Company's other chief accounting officers (including its controller) and board
of directors.

CONFLICTS OF INTEREST

A "conflict of interest" occurs when your private interest interferes or appears
to interfere in any way with the interests of the Company. You are expected to
avoid all situations that might lead to a real or apparent material conflict
between your self-interest and the interests of the Company. Any position or
interest, financial or otherwise, which could materially conflict with your
responsibility to the Company, or which affects or could reasonably be expected
to affect your independence or judgment concerning transactions between the
Company, its customers, suppliers or competitors or otherwise reflects
negatively on the Company would be considered a conflict of interest.

CONFIDENTIALITY

Nonpublic information regarding the Company or its businesses, employees,
customers and suppliers is confidential. You are only to use such confidential
information for the business purpose intended. You are not to share confidential
information with anyone outside of the Company, including family and friends, or
with other employees who do not need the information to carry out their duties.
You may be required to sign a confidentiality agreement in the course of your
employment at the Company. You remain under an obligation to keep all
information confidential even if your employment with the Company ends.

The following is a non-exclusive list of confidential information:

     (i)  Trade secrets, which include any business or technical information,
          such as formula, program, method, technique, compilation or
          information that is valuable because it is not generally known.

     (ii) All rights to any invention or process developed by an employee using
          the Company facilities or trade secret information, from any work for
          the Company, or relating to the Company's business, is considered to
          be "work-for-hire" under the United States copyright laws and shall
          belong to the Company.

     (iii) Proprietary information such as customer lists and customers'
          confidential information.

     (iv) Financial results, budgets or forecasts.


                                        2

<PAGE>

     (v)  Business plans, operating plans, strategy statements, memorandums,
          operating manuals, organizational charts and other internal
          communications.

     (vi) New products, processes and designs.

     (vii) Wages and salaries, bonus or compensation plans, notices to employees
          or unannounced personnel changes.

     (viii) Company investments, acquisitions or divestitures.

     (ix) Whether a products or business is meeting financial or other
          expectations.

     (x)  Business relationships or the terms of any business arrangement,
          including prices paid or received by the Company.

Public and media communications involving the Company must be made only by the
Company's Chief Executive Officer and President or his designee.

You may not disclose to unauthorized persons or use for your own personal
advantage or profit, or the advantage or profit of another, any confidential
information that you obtain as a result of your position with the Company. This
includes not only financial analysts and the press, but also business
associates, family members and personal friends. It is a serious mistake to
disclose such information to anyone simply because you are confident that person
will neither try to benefit from it nor disclose it to others.

Your obligations not to disclose the Company's confidential information and not
to use it for unauthorized purposes continue after your affiliation with the
Company ends.

The Company is entrusted with important information about individuals and
businesses. It is essential that you respect the confidential nature of this
information. The Company is legally obliged to protect the privacy of a
consumer's personal financial information. The Company's privacy practices are
set out in a privacy policy that is circulated to our customers and made
available to the public. All employees are expected to adhere to the Company's
privacy policy.

CORPORATE OPPORTUNITIES

Using confidential information about the Company or its businesses, directors,
officers, employees, customers, consumers or suppliers for personal benefit or
disclosing such information to others outside your normal duties is prohibited.

Title 18 U.S. Code, Section 215, makes it a criminal offense for any Company
employee to corruptly:

     (i)  Solicit for himself or herself or for a third party anything of value
          from anyone in return for any business, service or confidential
          information of the Company; or


                                        3

<PAGE>

     (ii) Accept anything of value (other than normal authorized compensation)
          from anyone in connection with the business of the Company, either
          before or after a transaction is discussed or consummated.

You are prohibited from:

     (i)  Personally benefiting from opportunities that are discovered through
          the use of the property, contacts, information or position of the
          Company.

     (ii) Accepting employment or engaging in a business (including consulting
          or similar arrangements) that may conflict with the performance of
          your duties or the Company's interest.

     (iii) Soliciting, demanding, accepting or agreeing to accept anything of
          value from any person in conjunction with the performance of your
          employment or duties at the Company.

     (iv) Acting on behalf of the Company in any transaction in which you or
          your immediate family has a significant direct or indirect financial
          or other interest.

There are certain situations in which you may accept a personal benefit from
someone with whom you transact business such as:

     (i)  Accepting a gift in recognition of a commonly recognized event or
          occasion (such as a promotion, new job, wedding, retirement or
          holiday). An award in recognition of service and accomplishment may
          also be accepted without violating these guidelines so long as the
          gift does not exceed $150 from any one individual in any calendar
          year. Any gift in excess of $150 must be reported to the President and
          Chief Executive Officer.

     (ii) Accepting something of value if the benefit is available to the
          general public under the same conditions on which it is available to
          you.

     (iii) Accepting meals, refreshments, travel arrangements and accommodations
          and entertainment of reasonable value in the course of a meeting or
          other occasion to conduct business or foster business relations if the
          expense would be reimbursed by the Company as a business expense if
          the other party did not pay for it.

INSIDER TRADING

It is both unethical and illegal to buy, sell, trade or otherwise participate in
transactions involving the Company's common stock while in possession of
material information concerning the Company that has not been released to the
general public, but which when released may have an impact on the market price
of the Company's common stock. It is also unethical and illegal to buy, sell,
trade or otherwise participate in transactions involving the common stock or
other security of any other company while in possession of similar non-public
material information concerning such company. Any questions concerning the
propriety of participating in a


                                        4

<PAGE>

Company or other company stock or other security transaction should be directed
to the Chief Financial Officer.

EXTENSIONS OF CREDIT

The Company may extend credit to any officer, director, or principal shareholder
or employee of the Company only in compliance with Maryland and federal law and
regulations and the Company's policies with respect thereto, if any.

OUTSIDE BUSINESS RELATIONSHIPS

You must disclose all new directorships or potential directorships to the
President and Chief Executive Officer in order to avoid any conflicts of
interest. Senior executives and financial officers of the Company are prohibited
from holding outside employment.

The Company encourages civic, charitable, educational and political activities
as long as they do not interfere with the performance of your duties at the
Company.

FAIR DEALING

You should undertake to deal fairly with the Company's customers, suppliers,
competitors and employees. Additionally, no one should take advantage of another
through manipulation, concealment, abuse of privileged information,
misrepresentation of material facts, or any other unfair-dealing practices.

You must disclose prior to or at the time of hire, the existence of any
employment agreement, non-compete or non-solicitation agreement, confidentiality
agreement or similar agreement with a former employer that would in any way
restrict or prohibit the performance of any duties or responsibilities with the
Company. Copies of such agreements should be provided to the human resources
personnel to permit evaluation of the agreement in light of your position. In no
event shall you use any trade secrets, proprietary information or other similar
property, acquired in the course of your employment with another employer, in
the performance if your duties for or on behalf of the Company.

You should not directly or indirectly accept bequests under a will or trust if
such bequests have been made to them because of their employment with the
Company.

PROTECTION AND PROPER USE OF COMPANY PROPERTY

You should protect the Company's property and assets and ensure their efficient
and proper use. Theft, carelessness and waste can directly impact the Company's
profitability, reputation and success. Permitting the Company property
(including data transmitted or stored electronically and computer resources) to
be damaged, lost, or used in an unauthorized manner is strictly prohibited. You
may not use corporate, bank or other official stationary for personal purposes.


                                        5

<PAGE>

COMPLIANCE WITH LAWS, RULES AND REGULATIONS

This Code of Ethics is based on the Company's policy that all directors,
officers and employees comply with the law. While the law prescribes a minimum
standard of conduct, this Code of Ethics requires conduct that often exceeds the
legal standard.

PREPARATION OF PERIODIC REPORTS FILED WITH GOVERNMENTAL AND REGULATORY AGENCIES

Particular care is required in the preparation of the Company's filings
("Securities Reports") with the Securities and Exchange Commission pursuant to
the Securities Exchange Act of 1934, as amended, and the rules and regulations
of the Securities and Exchange Commission thereunder (collectively, the
"Securities Laws"), as well as the Company's filings and communications
(collectively, "Regulatory Reports") with federal and Maryland bank regulatory
authorities. It is essential that the Company's Securities Reports contain full,
fair, accurate, timely and understandable disclosure and otherwise comply with
the letter and spirit of the Securities Laws for the protection of the Company
and its stockholders and to engender public confidence in the information
provided by the Company in its Securities Reports. Similarly, it is essential
that the Company's Regulatory Reports contain full, fair, accurate, timely and
understandable disclosure and otherwise comply with the letter and spirit of
applicable federal and state banking laws and regulations ("Banking Laws").
Accordingly, you must use your best efforts to ensure that the Company's
Securities Reports and Regulatory Reports and other public communications made
by the Company contain full, fair, accurate, timely and understandable
disclosure and that the Company at all times complies in all material respects
with the letter and spirit of the Securities Laws and the Banking Laws.

REPORTING OF ILLEGAL OR UNETHICAL BEHAVIOR AND VIOATIONS OF THIS CODE OF ETHICS

You are expected to demonstrate the ability to properly manage your personal
finances, particularly the prudent use of credit. The Company recognizes that
its customers must have faith and confidence in the honesty and character of its
employees, officers and directors. In addition to the importance of maintaining
customer confidence, there are specific laws that outline the action the Company
must take regarding any known, or suspected, crime involving the affairs of the
Company. With respect to bank personnel covered by this policy, Community Bank
of Tri-County will file a Suspicious Activity Report in the case of any known,
or suspected, theft, embezzlement, check/debit card fraud, kiting,
misapplication or other defalcation involving bank funds.

Fraud is an element of business that can significantly affect the reputation and
success of the Company. The Company requires its employees, officers and
directors to report directly to the Audit Committee of the Board of Directors
and discuss any known or suspected criminal activity involving the Company or
its employees. If, during the course of employment, you become aware of any
suspicious activity or behavior, violations of laws, rules, regulations or this
Code of Ethics, you must report it to the Audit Committee of the Board of
Directors. Concerns regarding questionable accounting or auditing matters should
be handled under the procedures for confidential, anonymous submissions
established by the Audit Committee. Reporting the activity will not subject you
to discipline absent a knowingly false report.


                                        6

<PAGE>

ADMINISTRATION AND WAIVER OF CODE OF ETHICS

This Code of Ethics shall be administered and monitored by the Company's Chief
Financial Officer who will report such matters directly to the Audit Committee
of the Board of Directors. Any questions and further information on this Code of
Ethics should be directed to this individual.

It is also the responsibility of the Chief Financial Officer to annually
reaffirm compliance with the Code of Ethics by all employees, officers and
directors, and to obtain a signed certificate that each employee, officer and
director has read and understands the Code and will comply with it. You will be
required to sign a receipt form indicating you have read this Code of Ethics and
will comply with its provisions.

You are expected to follow this Code of Ethics at all times. Generally, there
should be no waivers to this Code of Ethics. However, in rare circumstances
conflicts may arise that necessitate waivers. Waivers will be determined on a
case-by-case basis by the Audit Committee of the Board of Directors. The Audit
Committee of the Board of Directors shall have the sole and absolute
discretionary authority to approve any deviation or waiver from this Code of
Ethics. Any waiver and the grounds for such waiver by directors or executive
officers shall be promptly disclosed to stockholders in a Current Report on Form
8-K.

Known or suspected violations of this Code of Ethics will be investigated and
may result in disciplinary action up to and including immediate termination of
employment.

The Company will provide to any person without charge, upon request, a copy of
this Code of Ethics. Such request should be made, in writing, to: Chief
Financial Officer, Tri-County Financial Corporation, 3035 Leonardtown Road,
Waldorf, Maryland 20601.


                                        7

<PAGE>

ACKNOWLEDGEMENT

I have received, read and understand the "Tri-County Financial Corporation Code
of Ethics."

I agree to adhere to its terms, requirements and specified procedures.


-------------------------------------   ----------------------------------------
Signature                               Witness

-------------------------------------
Name (printed)

Date:
      -------------------------------


                                        8