This paper presents the design, modeling and control of a direct fuel injector with rate shaping capability. Applied with a hydro-mechanical internal feedback mechanism, the novel design can deliver continuously variable injection rate by controlling the injector needle position. The feedback circuit and the orifices of the injector control chamber are particularly designed to overcome some design obstacles, such as the small assembly space and needle stroke, and the short operation time scale. The proposed injector not only provides a feasible injection rate shaping capability but also overcomes the injection quantity inconsistency caused by the conventional multiple-injection strategy. To track the desired injection rate delivery, an iterative learning controller is derived. The controller corrects the injection rate cycle by cycle, and an observer is designed to estimate the injection rate for the feedback control realization.