Inclusion Criteria:
* Age between 18 and 75 years
* Histologically or cytologically confirmed as ESCC, locally advanced and unresectable, with local recurrence (local lymph node metastases) or distant metastases
* Immunohistochemistry confirmed EGFR(3+) or EGFR-FISH-amplification or next generation sequencing confirmed EGFR-amplification (EGFR expression is not required in Phase 1b, but only patients with EGFR overexpression will be included in Phase 2).
* Disease progression after first-line or subsequent lines of therapy.
* Eastern Cooperative Oncology Group (ECOG) performance status of 0-1.
* Adequate organ function within 7 days prior to treatment initiation, meeting the following criteria:Hematology (without transfusion, blood products, or administration of G-CSF or other hematopoietic stimulants within the past 14 days):
1. Hemoglobin (Hb) ≥ 90 g/L;
2. Absolute neutrophil count (ANC) ≥ 1.5 × 10⁹/L;
3. Platelet count (PLT) ≥ 75 × 10⁹/L.
Serum biochemistry:
1. Total bilirubin (TBIL) ≤ 1.5 × the upper limit of normal (ULN);
2. Alanine aminotransferase (ALT) and aspartate aminotransferase (AST) ≤ 2.5 × ULN; for patients with liver metastases, ALT and AST ≤ 5 × ULN;
3. Serum creatinine (Cr) ≤ 1.5 × ULN or creatinine clearance (CCr) ≥ 60 mL/min. Cardiac function: Left ventricular ejection fraction (LVEF) ≥ 50%, as assessed by Doppler ultrasound.
Coagulation: International normalized ratio (INR) or prothrombin time (PT) ≤ 1.5 × ULN.
* Female patients of childbearing potential must agree to use appropriate contraception from screening until 3 months after the end of treatment and must not be breastfeeding. A negative pregnancy test is required within 7 days before the start of treatment. Male patients must agree to use appropriate contraception or have undergone surgical sterilization during the study and for 8 weeks after the last administration of study medication.
* All subjects are recruited on a voluntary basis and sign the informed consent. They are required to be compliant with the study and cooperative with the follow-up.
Exclusion Criteria:
* Patients who have a history of other malignancies in the past five years (except for the cured basal cell carcinoma and cervical carcinoma in situ)
* The patient has any active autoimmune disease or a history of autoimmune disease
* History of severe allergic reactions or known allergies to macromolecular protein preparations, Afatinib, Palbociclib, or any component of their formulations that have resulted in hospitalization.
* Presence of contraindications to Palbociclib or Afatinib.
* Previous or planned treatments as follows:
1. Prior use of EGFR inhibitors or CDK4/6 inhibitors.
2. Administration of any live vaccines (e.g., influenza or varicella vaccines) within 4 weeks before the first dose or during the study.
3. Major surgery or significant trauma within 4 weeks before the first dose.
4. Residual toxicities from prior anti-tumor therapies not resolved to ≤ Grade 1 per CTCAE v5.0, except for alopecia or platinum-based therapy-induced neuropathy.
* Severe medical conditions, such as:
1. NYHA Class II or higher heart failure.
2. Ischemic heart disease (e.g., myocardial infarction or angina).
3. Clinically significant supraventricular or ventricular arrhythmias.
4. Poorly controlled diabetes (fasting blood glucose ≥ 10 mmol/L).
5. Poorly controlled hypertension (systolic BP \> 150 mmHg and/or diastolic BP \> 100 mmHg).
6. Left ventricular ejection fraction (LVEF) \< 50% on echocardiography.
7. QTc interval \> 450 ms in males or \> 470 ms in females.
8. Abnormal ECG findings deemed to pose additional risk by the investigator.
* Active infections or unexplained fever within 48 hours prior to the first dose, or systemic antibiotic use within one week prior to informed consent.
* Active hepatitis B (HBV DNA ≥ 2000 IU/mL or ≥ 10⁴ copies/mL), hepatitis C (anti-HCV antibody positive with detectable HCV RNA), known HIV positivity, or acquired immunodeficiency syndrome (AIDS).
* Any medical or other condition which, in the opinion of the investigator, would preclude participation in a clinical trial.
* Pregnancy or lactation.
* Receipt of any investigational drug within 4 weeks before the first dose or concurrent enrollment in another clinical trial, except for observational (non-interventional) studies or interventional trials in follow-up.
* Any other factors deemed by the investigator to potentially interfere with study participation, including the ability to complete study treatment and follow-up.