The diet and ontogenetic partitioning of the Australian weasel shark Hemigaleus australiensis was examined in Moreton Bay, south-east Queensland, Australia. The index of relative importance (IRI) revealed a highly specialized diet, consisting entirely of cephalopod molluscs (99·6% IRI) and crustaceans (0·4% IRI). Benthic octopus (Octopoda) dominated the diet, accounting for 96·7% IRI. A highly significant difference was found between the stomach contents of juvenile and sub-adult and adult Australian weasel sharks. Dietary specialization increased with ontogeny and fish ≥1000 mm in total length (LT) fed almost exclusively on octopus (98% IRI). A highly significant difference was found between the LT of Australian weasel sharks from coral and sand and seagrass sites. At the coral site 75·4% of fish were mature while at the sand and seagrass site only 16·1% were mature. This spatial segregation may be attributed to shifting energy requirements associated with ontogeny and the relative abundance of large octopus at the coral site. Hemigaleus australiensis resides in an area of high shark diversity and its specialized cephalopod diet may reduce competition for food with other Carcharhiniformes whose prey comprises predominantly teleosts.