  We prove a conjectured lower bound on $\left< T_{--}(x) \right>_\psi$ in any
state $\psi$ of a relativistic QFT dubbed the Quantum Null Energy Condition
(QNEC). The bound is given by the second order shape deformation, in the null
direction, of the geometric entanglement entropy of an entangling cut passing
through $x$. Our proof involves a combination of the two independent methods
that were used recently to prove the weaker Averaged Null Energy Condition
(ANEC). In particular the properties of modular Hamiltonians under shape
deformations for the state $\psi$ play an important role, as do causality
considerations. We study the two point function of a "probe" operator
$\mathcal{O}$ in the state $\psi$ and use a lightcone limit to evaluate this
correlator. Instead of causality in time we consider \emph{causality in modular
time} for the modular evolved probe operators, which we constrain using
Tomita-Takesaki theory as well as certain generalizations pertaining to the
theory of modular inclusions. The QNEC follows from very similar considerations
to the derivation of the chaos bound and the causality sum rule. We use a kind
of defect Operator Product Expansion to apply the replica trick to these
modular flow computations, and the displacement operator plays an important
role. Our approach was inspired by the AdS/CFT proof of the QNEC which follows
from properties of the Ryu-Takayanagi (RT) surface near the boundary of AdS,
combined with the requirement of entanglement wedge nesting. Our methods were,
as such, designed as a precise probe of the RT surface close to the boundary of
a putative gravitational/stringy dual of \emph{any} QFT with an interacting UV
fixed point. We also prove a higher spin version of the QNEC.
