While charging such an attack, players can shield to cancel/store the charge, perform a grab, or tap left/right on the control stick or d-pad to immediately roll out of the charge, which also cancels/stores it.
Some charge attacks can be charged and canceled in the air, such as Donkey Kong's Giant Punch or Sheik's Needle Storm. To cancel a charge in the air, players can simply press the shield or grab button while charging. Due to its buffer system, charge-canceling Giant Punch in Brawl will result in the Donkey Kong performing an air dodge if the input is entered late into the charge animation.
List of moves that can be charge-cancelled
Samus is the only character who cannot charge cancel in midair, since Charge Shot cannot be charged in midair.