The global amphibian biodiversity crisis is driven by disease, habitat destruction and drastically altered ecosystems. It has given rise to an unprecedented need to understand the link between rapidly changing environments, immunocompetence and wildlife health (the nascent field of ecoimmunology). Increasing our knowledge of the ecoimmunology of amphibians necessitates the development of reliable, field-applicable methods of assessing immunocompetence in non-model species. The phytohaemagglutinin (PHA) inflammation assay uses a lectin to elicit localized inflammation that reflects an organism's capacity to mount an immune response. Although extensively used in birds to assess responses to environmental change, stress and disease, its application in amphibians has been extremely limited. We developed, validated and optimized a practical and effective phytohaemagglutinin inflammation assay in phylogenetically distant amphibians and demonstrated its suitability for use in a wide range of ecoimmunological studies. The protocol was effective for all species tested and worked equally well for both sexes and for adult and sub-adult animals. We determined that using set-force-measuring instruments resulted in a 'compression effect' that countered the inflammatory response, reinforcing the need for internal controls. We developed a novel method to determine peak response times more accurately and thereby improve assay sensitivity. Histological validation demonstrated considerable interspecies variation in the robustness of amphibian immune defences. Importantly, we applied the assay to a real-world scenario of varying environmental conditions and proved that the assay effectively detected differences in immune fitness between groups of animals exposed to ecologically meaningful levels of density stress. This provided strong evidence that one cost of metamorphic plasticity responses by tadpoles to increasing density is a reduction in post-metamorphic immune fitness and that metamorphosis does not prevent phenotypic carry-over of larval stress to the adult phenotype. This assay provides an effective tool for understanding the role of global environmental change in the amphibian extinction crisis.