We investigate ow and magnetic structure of a solar prominence with a focus on how the magnetic eld originally determined by subsurface dynamics gives rise to the structure. We perform a magnetohydrodynamic simulation that reproduces the self-consistent evolution of a ow and the magnetic eld passing freely through the solar surface. By analyzing Lagrangian displacements of magnetized plasma elements, we demonstrate the ow structure that is naturally incorporated to the magnetic structure of the prominence formed via dynamic interaction between the ow and the magnetic eld. Our results explain a diverging ow on a U-loop, a counterclockwise downdraft along a rotating eld line, acceleration and deceleration of a down ow along an S-loop, and partial emergence of a W-loop, which may play key roles in determining structural properties of the prominence.