Full-waveform inversion (FWI) has been proven as an effective method to estimate subsurface parameters by iteratively reducing the data residual between the predictions and the observations. Nevertheless, FWI is greatly dependent on the initial model, and a poor initial model will lead to an incorrect solution. Furthermore, owing to the anelasticity of the earth, seismic waves will attenuate during propagation, which results in an attenuated gradient and makes the convergence rate of FWI even worse in viscoacoustic medium. Commonly, multiparameter (e.g. velocity and Q) waveform inversion can be used to mitigate these problems. Benefiting from the theory of Q-compensated wavefield propagation, we develop a Q-compensated joint multiparameter waveform inversion method to weaken the nonlinearity of the FWI objective function, which enables it to cope with challenges related with attenuation-induced gradient energy loss and cycle skipping simultaneously. We refer to our Q-compensated joint multiparameter FWI scheme as QJMFWI. The main contributions of QJMFWI are as follows: (1) given the difficulty associated with the estimation of velocity and Q simultaneously in viscoacoustic media, QJMFWI provides a straightforward waveform inversion method for velocity and Q model construction, by which we can obtain velocity and Q information with improved accuracy and resolution; and (2) compared with conventional FWI methods, QJMFWI relaxes the requirement for a good initial velocity and Q model, which can avoid trapping into local minima. Numerical and field data examples demonstrate that QJMFWI is an effective method to invert for accurate subsurface parameters in viscoacoustic media.