Breastfeeding is well-known to have a protective effect against infection in infants. It has been suggested that breast milk may play a role in the prevention of certain childhood cancer. We investigated this issue in a case-control study comprising 300 patients with childhood cancer. There was 73 patients (24.3%) with leukemia, 82 patients (27.3%) with lymphoma, and 146 patients (48.4%) with solid tumors (brain tumors, neuroblastoma, soft tissue sarcomas, germ cell tumors, renal tumor, bone tumor, retinoblastoma, hepatoblastoma, and others) and 316 controls matched for age and sex. Breastfeeding duration of the control group was found to be significantly longer than the patient group (X-2 = 57.774; P < .001). In conclusion, breastfeeding was found to be inversely associated with pediatric cancer in our study.