The Sun has a Near-Surface Shear Layer (NSSL), within which the angular velocity decreases rapidly with radius. We provide an explanation of this layer based on the thermal wind balance equation. Since convective motions are not affected by solar rotation in the top layer of the convection zone, we argue that the temperature falls at the same rate at all latitudes in this layer. This makes the thermal wind term very large in this layer and the centrifugal term has also to become very large to balance it, giving rise to the NSSL. From the values of differential rotation Ω(𝑟 < 𝑟𝑐, 𝜃) at radii less than a radius 𝑟𝑐, we can calculate the temperature difference Δ𝑇 (𝑟, 𝜃) with respect to the standard solar model at different points of the convection zone, by making use of the thermal wind balance equation. Then we again use this equation in the top layer to calculate Ω(𝑟 > 𝑟𝑐, 𝜃) there from Δ𝑇 (𝑟, 𝜃). We carry on this exercise using both an analytical expression of the differential rotation and the actual data provided by helioseismology. We find that our theoretical results of the NSSL match the observational data reasonably well for 𝑟𝑐 ≈ 0.96𝑅⊙, giving an estimate of the radius till which the convective motions are affected by the solar rotation.