We study a scalar component of the 8-point next-to-next-to-maximally-helicity-violating (N2MHV) amplitude at two-loop level in $$ \mathcal{N} $$
N
= 4 super-Yang-Mills theory; it has a leading singularity proportional to the inverse of the four-mass-box square root and receives contributions from only two types of non-trivial integrals with one-loop infrared (IR) divergences. We compute such two-loop 8-point integrals by taking (double-)collinear limits of certain finite, dual-conformal-invariant integrals, and they nicely give the IR-safe ratio function after subtracting divergences. As the first genuine two-loop N2MHV amplitude computed explicitly, we find remarkable structures in its symbol and alphabet: similar to the next-to-MHV (NMHV) case, there are still 9 algebraic letters associated with the square root, and the latter also becomes a letter for the first time; unlike the NMHV case, such algebraic letters appear at either one or all of the second, third and last entry, and the part with three odd letters is particularly simple.