Abstract We measure the genus of the galaxy distribution in two-dimensional slices of the SDSS-III BOSS catalog to constrain the cosmological parameters governing the expansion history of the universe. The BOSS catalogs are divided into 12 concentric shells over the redshift range 0.25 < z < 0.6, and we repeatedly measure the genus from the two-dimensional galaxy density fields, each time varying the cosmological parameters used to infer the distance–redshift relation to the shells. We also indirectly reconstruct the two-dimensional genus amplitude using the three-dimensional genus measured from SDSS Main Galaxy Sample with galaxies at low redshift z < 0.12. We combine the low- and high-redshift measurements, finding the cosmological model that minimizes the redshift evolution of the genus amplitude, using the fact that this quantity should be conserved. Being a distance measure, the test is sensitive to the matter density parameter (Ωm) and equation of state of dark energy (w de). We find a constraint of w de = − 1.05 − 0.12 + 0.13 , Ωm = 0.303 ± 0.036 after combining the high- and low-redshift measurements and combining with Planck CMB data. Higher-redshift data and combining data sets at low redshift will allow for stronger constraints.