While studies of active nematics in two dimensions have shed light on various aspects of the flow regimes and topology of active matter, three-dimensional properties of topological defects and chaotic flows remain unexplored. By confining a film of active nematics between two parallel plates, we use continuum simulations and analytical arguments to demonstrate that the crossover from quasi-two-dimensional (quasi-2D) to three-dimensional (3D) chaotic flows is controlled by the morphology of the disclination lines. For small plate separations, the active nematic behaves as a quasi-2D material, with straight topological disclination lines spanning the height of the channel and exhibiting effectively 2D active turbulence. Upon increasing channel height, we find a crossover to 3D chaotic flows due to the contortion of disclinations above a critical activity. Above this critical activity highly contorted disclination lines and disclination loops are formed. We further show that these contortions are engendered by twist perturbations producing a sharp change in the curvature of disclinations.