Many phenomena of fundamental importance to biology and biomedicine arise as a dynamic curve, such as organ growth and HIV dynamics. The genetic mapping of these traits is challenged by longitudinal variables measured at irregular and possibly subject-specific time points, in which case nonnegative definiteness of the estimated covariance matrix needs to be guaranteed. We present a semiparametric approach for genetic mapping within the mixture-model setting by jointly modeling mean and covariance structures for irregular longitudinal data. Penalized spline is used to model the mean functions of individual quantitative trait locus (QTL) genotypes as latent variables, whereas an extended generalized linear model is used to approximate the covariance matrix. The parameters for modeling the mean–covariances are estimated by MCMC, using the Gibbs sampler and the Metropolis–Hastings algorithm. We derive the full conditional distributions for the mean and covariance parameters and compute Bayes factors to test the hypothesis about the existence of significant QTLs. We used the model to screen the existence of specific QTLs for age-specific change of body mass index with a sparse longitudinal data set. The new model provides powerful means for broadening the application of genetic mapping to reveal the genetic control of dynamic traits. Copyright © 2012 John Wiley & Sons, Ltd.