Modulating the heating and cooling during plastic deformation has been critical to control the microstructure and phase change in metals. During laser shock peening under optimal elevated temperatures, high-density dislocations and nanoprecipitates can be generated to greatly enhance material strength and fatigue life in metals. Currently, heating control during laser shock is limited to steady-state heat transfer, such as hot plate, irradiative heating, or far-infrared heating, which is slow for practical treatment and does not provide the transient conditions for generating nanostructures during shock processing. In this paper, we propose a general methodology to modulate the heating and cooling during laser shock processing via temporal pulse shaping, namely dual pulse laser shock peening (DP-LSP), which combines both ultrafast-heating and laser shock peening in one operation to generate desired microstructure and mechanical property. By modulating the duration of pulses as well as the spacing between pulses, different processing temperatures can be achieved. To test the feasibility of this novel process, DP-LSP has been applied to an Al matrix nanocomposite. Single pulse laser shock peening was able to remelt large second phase precipitates due to fast cooling, resulting in smaller grains (500 nm), while using DP-LSP with the appropriate pulse duration, dynamic precipitation effects can generate nanosized (30 nm) intermetallic phase Al3Ti with high density. By generation of grain size refinement, high-density nanoscale precipitates, and dislocations after DP-LSP, the yield strength increases by 18% and 102% compared with single pulse processing, and original sample respectively. Finite element method modeling was used to simulate the temperature profile in the alloy during the temporal modulated dual laser pulsing. A phase-field model and multiscale dislocation dynamics were applied to study dislocation dynamics and nanoprecipitation generation during DP-LSP, and their interactions at elevated temperatures. The work provides the basis for controlling microstructure in DP-LSP to enhance mechanical properties in metals.