The cavitation formation of fuel flow inside an optically transparent nozzle and the dynamics of spray breakup and atomization at the near-nozzle region were captured by a long working distance microscope and a camera with high spatial and temporal resolutions. The images revealed the formation of a variety of complex cavitation and their temporal evolution. The cavitation initially occurred in the valve seat area and then developed in the whole orifice. The increase of injection pressure led to earlier cavitation inception and enlarged cavitation. A new dimensionless number S was proposed to represent the cavitation intensity in a quantitative manner. The S increased about 10% for every 10MPa in injection pressure. Image analysis also revealed the relationship between the spray structure at the near nozzle region and the bubble dynamics in the injector orifice. Spray angle, penetration length and spray area were noticeably affected by the injection pressure (30, 40, 50, 60MPa) as well.