Inclusion Criteria:
* Fully understand the study and voluntarily sign the informed consent form(ICF).
* Age ≥ 18 and ≤ 75 years old at the time of signing the ICF, either male or female;
* Eastern Cooperative Oncology Group (ECOG) Performance Status of 0 or 1.
* Life expectancy ≥ 3 months.
* All adverse events from prior treatment have either returned to baseline or CTCAE 5.0 ≤ Grade 1(except for AEs not constituting a safety risk in the opinions of the investigators, e.g. alopecia, hypothyroidism which can be treated with a hormone replacement, etc).
* Both male and female participants (unless postmenopausal, surgical sterilization) and partners must agree to use a reliable form of contraception during the study treatment period and for at least 6 months after the last dose of the study drug.
* For lesions that have received radiation therapy, only after the progression of the lesions, they can be considered measurable lesions.
Part 1:
* Must have at least 1 measurable lesion per Response Evaluation Criteria in Solid Tumors v1.1 (RECIST v1.1).
* Participants with histologically or cytologically confirmed diagnosis of advanced solid tumors, in whom available standard treatments failed or were intolerable.
Exclusion Criteria:
* Participants receiving any of the following treatments:
1. Previously treated with systemic TLR7/8 immunomodulators.
2. Any other investigational product treatment within 4 weeks before the first dosing.
3. Chemotherapy, biotherapy, endocrine therapy (except for hormone replacement), and biological targeted medicines within 4 weeks before the first dosing. Local palliative radiotherapy, traditional Chinese medicine with anti-tumor effect, and small molecule targeted therapy within 2 weeks (or 5 half-lives, whichever is longer) before the first dosing.
4. Major surgery within 4 weeks before the first dosing for any reason (excluding puncture biopsy), or need to undergo elective surgery during the trial.
5. Potent CYP3A4/5 inducer or inhibitor within 2 weeks prior to administration of the first dose of the study drug.
6. Systemic immunosuppressive drugs within 2 weeks prior to administration of the first dose of the study drug, including systemic corticosteroids (\>10 mg/day prednisone or equivalent).
7. Other immunomodulators within 2 weeks prior to administration of the first dose of the study drug, including but not limited to thymosin, interleukin-2 and interferon.
* Had CTCAE Grade ≥3 immune-related adverse events (irAE) after receiving immunotherapy.
* The main organ function meets any of the following criteria within 7 days prior to the first dosing. (Note: blood transfusion, EPO, G-CSF, albumin infusion and renal replacement therapy are not allowed within 14 days prior to treatment.)
1. Hematological function: ANC \< 1.5×10\^9/L, PLT \< 75×10\^9/L, Hemoglobin (Hb) \< 100 g/L.
2. Hepatic function: Alanine aminotransferase (ALT) and aspartate aminotransferase (AST) ≥ 3×ULN; ALT and AST ≥ 5×ULN for participants with liver metastases; Total bilirubin (TBIL) ≥ 1.5×ULN; albumin \< 30 g/L.
3. Creatinine clearance\< 75 mL/min.
4. INR \> 1.5 or APTT \> 1.5×ULN.
5. The urine protein presents positive and the quantitative result of 24-h urine protein ≥ 1 g.
* Participants with symptomatic central nervous system (CNS) metastases or carcinomatous meningitis; or other evidence suggesting that the central nervous system metastasis or meningeal metastasis is not well-controlled and is judged by the investigator to be unsuitable for enrollment.
* Uncontrollable third cavity effusion (e.g. large amount pleural effusion, ascites, or pericardial effusion, etc.) requiring repeated drainage, which is judged by the investigator to be unsuitable for enrollment.
* Known history of neurological disorders affecting brain functional activities, including epilepsy or dementia.
* Severe cardiac-cerebral vascular disease, including but not limited to:
1. Acute myocardial infarction, unstable angina, stroke, or received coronary angioplasty or stent implantation within 6 months before the first dosing.
2. New York Heart Association functional class II to IV congestive heart failure or left ventricular ejection fraction (LVEF) \< 50% or the lower normal limit.
3. Uncontrollable hypertension (even though the best available treatment is used but systolic blood pressure ≥ 160 mmHg or diastolic blood pressure ≥ 100 mmHg).
4. QTcF interval prolongation during the baseline period.
* Participants with active or history of autoimmune diseases (such as systemic lupus erythematosus, rheumatoid arthritis, vasculitis, etc.), except for clinically stable autoimmune thyroid diseases.
* Active infection requiring systemic therapy within 7 days prior to the first dosing; active hepatitis B or hepatitis C, history of immunodeficiency virus (HIV) disease or HIV antibody positive.
* Priorly received allogeneic stem cell transplantation or solid organ transplantation.
* Known allergy to the ZG0895.HCl or any of its excipients; have severe allergy history (CTCAE Grade ≥ 3), such as severe urticaria, angioedema, severe anaphylaxis, etc.
* Females who are pregnant or nursing during the screening period.
* The investigators consider that the participants are not suitable to participate in the clinical study for other reasons.