Waveform inversion (WI), which has been extensively used in reflection seismology, could provide improved velocity models and event locations for microseismic surveys. Here, we develop an elastic WI algorithm for anisotropic media designed to estimate the 2D velocity field along with the source parameters (location, origin time, and moment tensor) from microseismic data. The gradient of the objective function is obtained with the adjoint-state method, which requires just two modeling simulations at each iteration. In the current implementation the source coordinates and velocity parameters are estimated sequentially at each stage of the inversion to minimize trade-offs and improve the convergence. Synthetic examples illustrate the accuracy of the inversion for layered VTI (transversely isotropic with a vertical symmetry axis) media, as well as the sensitivity of the velocity-analysis results to noise, the length of the receiver array, errors in the initial model, and variability in the moment tensor of the recorded events.