We develop a (3+1)-dimensional hybrid evolution model for heavy-ion collisions with dynamical sources for the energy-momentum tensor and baryon current. During an initial pre-equilibrium stage based on UrQMD, the four-momenta and baryon numbers carried by secondary particles created within UrQMD are fed continuously, after a short thermalization time, into a (3+1)-dimensional viscous hydrodynamic evolution module including baryon transport. The sensitivity of the initial conditions to model parameters and the effect of baryon diffusion on the hydrodynamic evolution are studied.