Aims To investigate the hypothesis that use of antibiotics is related to subsequent development of breast cancer and also to apply this theory to other cancer types. Materials and methods A nested case-control study was conducted, using data linkage between the RNZCGP Research Unit database and the New Zealand Hospital Separation Diagnosis database. Cancer related hospital admissions were identified between 1998 and 2002, and prior antibiotic exposure in these patients was then found. Results A total of 6678 patients were identified with a newly diagnosed cancer in this time period. A slightly increased odds ratio (OR) (95% CI) for breast cancer was seen with penicillin, 1.07 (1.02-1.13). Penicillin was also associated with an increased OR with lung and respiratory cancer, 1.13 (1.06-1.21), and skin neoplasms, 1.05 (1.02-1.08). Significant associations were seen between macrolides and leukaemia, 1.15 (1.01-1.30), lung and respiratory cancers, 1.23 (1.10-1.38) and non-Hodgkin's lymphoma, 1.26 (1.02-1.55). Tetracyclines were significantly associated with non-Hodgkin's lymphoma, 1.12 (1.01-1.24). Cephalosporins only showed a significant association with leukaemia, 1.35 (1.06-1.71), sulphonamides with colorectal cancers, 1.12 (1.01-1.24), and 'other' antibiotic classes with bladder and renal cancers, 1.34 (1.07-1.67). Conclusions It is most likely that antibiotic exposure represents a confounding factor rather than a causation for breast cancer and other cancer types.