Needle insertion procedures under ultrasound guidance are commonly used for diagnosis and therapy. It is often critical to accurately reach a targeted region, and this can be difficult to achieve due to intra-operative tissue motion. In this paper, we present a method to steer a beveled-tip flexible needle towards a target embedded in moving tissue. Needle steering is performed using a needle insertion device attached to a robot arm. Closed-loop 3D steering of the needle is achieved using tracking of an artificial target in 2D ultrasound images and tracking of the needle tip position and orientation with an electromagnetic tracker. Tissue motion compensation is performed using force feedback to reduce targeting error and forces applied to the tissue. The method uses a mechanics-based interaction model that is updated online. A novel control law using task functions is proposed to fuse motion compensation, steering via base manipulation and tip-based steering. Validation of the tracking and steering algorithms are performed in gelatin phantom and bovine liver. Tissue motion up to 15mm is applied and average targeting error is 1.2±0.8mm and 2.5±0.7mm in gelatin and liver, respectively, which is sufficiently accurate for commonly performed needle insertion procedures.