Abstract Ray tracing is avoidable in seismic traveltime tomography. In this study, seismic traveltime tomography is reformulated as an eikonal equation-constrained optimization problem solved by the ray-free adjoint-state method. The resultant approach is called adjoint-state traveltime tomography. For completeness, an eikonal equation-based earthquake location method is developed to locate the hypocenters of earthquakes when necessary. The multiple-grid model parameterization is adopted to discretize the relative slowness perturbation . The step-size-controlled gradient descent method, which has an effect of damping regularization, is used to find optimal earthquake hypocenters and velocity models. The performances of the earthquake location and adjoint-state traveltime tomography methods are tested in the source area of the 2020 Mw 4.9 Anza earthquake, a seismologically active place in southern California. The obtained high-resolution P-wave velocity model demonstrates that the 2020 Mw 4.9 Anza earthquake and other historic moderate-sized Anza earthquakes occurred near or at the boundaries of low VP rocks, a typical seismogenic environment for moderate to large crustal earthquakes. Meanwhile, the source zone of the Anza earthquakes is characterized by high VP/VS, indicating the possible existence of crustal fluids as well as the critical role of fluids in the occurrence of those moderated-sized Anza earthquakes. On the whole, the well-performed eikonal equation-based earthquake location method and adjoint-state traveltime tomography method provide competent and attractive tools for hypocenter and tomographic inversions.