We consider the world surface in AdS_5 that ends on two intersecting null lines at the boundary. The corresponding string partition function describes the expectation value of the Wilson line with a null cusp in dual large N maximally supersymmetric gauge theory and thus determines the cusp anomaly function f(lambda) of the gauge coupling. The first two coefficients in its strong-coupling or string inverse tension expansion were determined in hep-th/0210115 (a_1=1) and in arXiv:0707.4254 (a_2=- 3 log 2). Here we find that the 2-loop coefficient is a_2 = - K where K is the Catalans constant. This is in agreement (expected on general grounds) with the previous results for f(lambda) as the coefficient of log(S) term in the energy of closed spinning string in AdS_5. The string theory value for a_2 is in agreement with the numerical result in hep-th/0611135 and the recent analytic result in arXiv:0708.3933 for the solution of the BES equation following from the asymptotic Bethe ansatz for the spectrum of the theory. We explicitly verify the cancellation of 2-loop 2d logarithmic divergences thus demonstrating the quantum consistency of the AdS_5 x S^5 superstring. We also discuss the structure of higher loop string corrections to the cusp anomaly giving a 2d QFT diagrammatic interpretation to the strong-coupling expansion of the cusp anomaly function as solution of the BES equation found in arXiv:0708.3933.