We present a novel method for sampling iso-likelihood contours in nested sampling using a type of machine learning algorithm known as normalizing flows and incorporate it into our sampler nessai. nessai is designed for problems where computing the likelihood is computationally expensive and therefore the cost of training a normalizing flow is offset by the overall reduction in the number of likelihood evaluations. We validate our sampler on 128 simulated gravitational wave signals from compact binary coalescence and show that it produces unbiased estimates of the system parameters. Subsequently, we compare our results to those obtained with dynesty and find good agreement between the computed log-evidences while requiring 2.07 times fewer likelihood evaluations. We also highlight how the likelihood evaluation can be parallelized in nessai without any modifications to the algorithm. Finally, we outline diagnostics included in nessai and how these can be used to tune the sampler's settings.