Hit the shutter as the firework is launching and hold it down until the burst has faded, typically a few seconds.
⇑ Translate the sentence above by Google ⇑
Related: firework