
124 Ill. App.3d 1052 (1984)
465 N.E.2d 110
LARRY HOFREITER, Plaintiff-Appellant,
v.
KEITH LEIGH, Defendant-Appellee.
No. 3-83-0279.
Illinois Appellate Court  Third District.
Opinion filed June 14, 1984.
*1053 George Mueller, of Hoffman, Mueller & Creedon, of Ottawa, for appellant.
Keith R. Leigh, of Seneca, for appellee.
Order affirmed.
JUSTICE BARRY delivered the opinion of the court:
Plaintiff Larry Hofreiter, an attorney, appeals from the dismissal of his complaint for breach of contract brought against defendant Keith Leigh, an Illinois attorney with whom plaintiff had served as co-counsel for a time in a wrongful death cause of action brought on behalf of James Cunico. According to the allegations of the complaint, defendant was engaged by Cunico and invited plaintiff to join him as co-counsel for prosecution of the wrongful death action, and the two attorneys agreed orally that they would share both the work and the fees equally. Defendant's client, Cunico, approved the arrangement, and suit was filed in November of 1979.
In February of 1980 plaintiff decided to move to California. The two attorneys discussed the arrangement and concluded that no change would be made in the agreement. According to plaintiff's allegations, defendant subsequently breached the agreement by preventing plaintiff from performing one-half the work and then attempting to deny plaintiff one-half of the fees paid upon settlement of the suit. Several letters were attached to the complaint as exhibits, including a letter dated October 12, 1981, from defendant to plaintiff stating that Cunico had authorized defendant to discharge plaintiff from further participation in the wrongful death cause. The wrongful death action was settled a few days later.
Defendant filed a motion to dismiss the complaint and attached his affidavit which asserted, inter alia, that plaintiff had performed no work since April of 1980 and that plaintiff had admitted orally to performing only 25% of the services in the wrongful death cause of action, for which defendant had paid plaintiff $4,166.67. (From other documents in the record, it would appear that the total attorney fee for settlement of the wrongful death action was $16,666.67, of which $4,166.67 represented one-fourth of the total.)
Plaintiff filed an affidavit in which he asserted that he had prepared the complaint, obtained a forensic engineer, discussed the case *1054 on the telephone for many hours, had returned from California for a deposition which was continued, and "would have done more had not attorney Leigh insisted on taking care of the court appearances and answering discovery in the case personally."
After a hearing, the trial court granted the motion to dismiss as to the two counts of plaintiff's complaint which alleged breach of contract. A third count asserting a cause of action for quantum meruit was not then dismissed by the trial court, but was subsequently dismissed upon motion of plaintiff. This appeal followed.
Plaintiff contends that his complaint does state a cause of action for breach of contract against defendant and that the trial court erred in dismissing the complaint. Plaintiff urges that all well-pleaded facts are admitted by a motion to dismiss, and that in this case, his allegations that defendant wrongfully prevented plaintiff from performing one-half of the legal work connected with the Cunico case was sufficient to state a cause of action.
Defendant's motion to dismiss asserted several grounds for dismissal, only two of which need be considered. First, defendant states that an attorney employed on a contingent fee basis does not have a cause of action for breach of contract when he has been discharged by the client prior to final disposition of the case. Defendant relies upon Rhoades v. Norfolk & Western Ry. Co. (1979), 78 Ill.2d 217, 399 N.E.2d 969, where the Illinois Supreme Court adopted the reasoning of the California Supreme Court: the client's right to discharge his attorney at will is not breach of contract but a term of the contract implied by law because of the special relationship between attorney and client. In Rhoades, the court permitted the attorney to be paid a reasonable fee on a quantum meruit basis for services rendered before discharge but did not permit recovery of the full contingent fee as originally contracted.
A similar statement of the law of Illinois was set out in De Korwin v. First National Bank (N.D. Ill. 1957), 155 F. Supp. 302, 305:
"It is elementary doctrine * * * that a client has an absolute and unconditional right to discharge his attorney at any time. The rule is stated in Illinois Law and Practice (vol. 4, Attorneys and Counselors, sec. 53, pp. 58-59):
`An attorney can be discharged at any time at the will or election of the client, with or without cause, and regardless of any previous arrangement between them. The questions of valid cause for the discharge goes only to the right of the attorney to compensation, that is, an attorney who is without *1055 fault can nevertheless be discharged, subject only to the client's obligation to compensate the attorney for services theretofore rendered, either on a quantum meruit or according to an express contract, if any, between the parties.'"
 1 According to a letter attached as an exhibit to plaintiff's complaint and not contradicted by plaintiff, his client Cunico discharged him prior to the settlement of the wrongful death action. This termination of his employment as one of the attorneys representing Cunico was subject only to plaintiff's right to compensation for services rendered on a quantum meruit theory. Plaintiff seeks to engraft an exception to this rule by insisting that it applies only to an action between attorney and client, not to a contract action between two attorneys. We do not agree. Any effort to enforce a contract involving the division of a contingent fee would of necessity involve a dispute between two or more attorneys, and we hold that the rule concerning compensation of a discharged attorney applies regardless of the remedy used to assert the claim for fees. In other words, the rule of law is the same whether the claim is asserted in a proceeding to enforce an attorney's lien or whether, as here, in a breach of contract action against former co-counsel.
Defendant also asserted as a ground for dismissal the provisions of Rule 2-107 of the Code of Professional Responsibility (included in rules promulgated by the supreme court (87 Ill.2d R. 2-107)), which reads in pertinent part as follows:
"(a) A lawyer shall not divide a fee for legal services with another lawyer who is not a partner in or associate of his law firm, unless
(1) the client consents * * *;
(2) the division is made in proportion to the services performed and responsibility assumed by each, except where the primary service performed by one lawyer is the referral of the client to another lawyer * * *."
Neither party contends that this was a referral situation. Plaintiff argues, however, that Rule 2-107 is applicable only to attorney-client situations and not to agreements between two attorneys and that it does not apply to this cause of action.
Defendant has called our attention to a recent case which held that claims pertaining to intra-attorney fee-sharing agreements "involve questions of law and professional responsibility." (Emphasis added.) (Corti v. Fleisher (1981), 93 Ill. App.3d 517, 527, 417 N.E.2d 764, 772.) The Corti decision involved a controversy that arose before the supreme court adopted the Illinois Code of Professional Responsibility *1056 which permits fee-sharing for referrals. Corti held invalid a contract between an attorney and his former law firm which in effect permitted sharing of fees after the employment ended where the only service rendered was referral. The court concluded that such a contract was contrary to public policy as enunciated in the Code of Professional Responsibility.
A similar view of public policy was enunciated in Benn & Associates, Ltd. v. Nelsen Steel & Wire, Inc. (1982), 107 Ill. App.3d 442, 437 N.E.2d 900, where the court stated that Supreme Court Rules, including the Code of Professional Responsibility, have the function of law and are a strong indicator of public policy in the area of attorney conduct. In a Federal case involving a fee controversy between lawyers, Fitzgerald v. Freeman (7th Cir.1969), 409 F.2d 427, the Seventh Circuit Court of Appeals upheld a ruling by the district court that ordinary legal rules of contract are not alone determinative in a controversy between attorneys, but there must also be compliance with the canons of professional ethics.
 2, 3 Plaintiff has cited no cases holding that fee disputes between attorneys should be decided without regard to the Code of Professional Responsibility. He does refer to Brick v. Hirsch (7th Cir.1964), 331 F.2d 251, where, in an action between attorneys, the court construed the terms of a fee agreement without mentioning the canons of professional ethics; however, nothing in that case indicates that any violation of the canons was involved or considered. We believe the better view is that the Illinois Code of Professional Responsibility applies to all claims for fee-sharing without regard to whether the claim is asserted against a client or against another attorney. The purpose of Rule 2-107(a)(1) is to serve the best interest of the client. Plaintiff admittedly did not perform services for which he seeks additional compensation in the case at bar. Whether his failure to perform was due to defendant's conduct or whether it was due to plaintiff's removal to California, the fact remains that an equal sharing of the work did not occur and that plaintiff is not entitled to enforcement of the original oral agreement as to equal sharing of fees, in violation of the Code of Professional Responsibility. To permit plaintiff to recover fees which he did not earn would ignore the fact that plaintiff was terminated by his client without performing the services for which he claims a right to compensation.
In defendant's motion to dismiss, he also stated that another claim between the same parties for the same purpose was pending as a part of the wrongful death action. However, at oral argument before this court, plaintiff stated that his claim in that cause has now *1057 been dismissed, and this is the only proceeding to determine his claim for additional fees. Hence, we need not consider the effect of another pending cause.
For the reasons given above, we affirm the order of dismissal entered by the circuit court of La Salle County.
Affirmed.
STOUDER, P.J., and ALLOY, J., concur.
