Abstract Extracellular matrix (ECM) organization influences cancer development and progression. It modulates the invasion of cancer cells and can hinder the access of immune cells to cancer cells. Effective quantification of ECM architecture and its relationship to the position of different cell types is, therefore, important when investigating the role of ECM in cancer development. Using topological data analysis (TDA), particularly persistent homology and Dowker persistent homology, we develop a novel analysis pipeline for quantifying ECM architecture, spatial patterns of cell positions, and the spatial relationships between distinct constituents of the tumour microenvironment. We apply the pipeline to 44 surgical specimens of lung adenocarcinoma from the lung TRACERx study stained with picrosirius red and haematoxylin. We show that persistent homology effectively encodes the architectural features of the tumour microenvironment. Inference using pseudo-time analysis and spatial mapping to centimetre scale tissues suggests a gradual and progressive route of change in ECM architecture, with two different end states. Dowker persistent homology enables the analysis of spatial relationship between any pair of constituents of the tumour microenvironment, such as ECM, cancer cells, and leukocytes. We use Dowker persistent homology to quantify the spatial segregation of cancer and immune cells over different length scales. A combined analysis of both topological and non-topological features of the tumour microenvironment indicates that progressive changes in the ECM are linked to increased immune exclusion and reduced oxidative metabolism.