The ejection of triatomic hydrogen molecular ions HD2(+) and D3(+) from CD3OH(2+) is investigated by first-principle molecular dynamics simulation. Two C-D chemical bonds are found to be broken to form a neutral D2 moiety that vibrates, rotates, and moves for a relatively long period of time (20-330 fs) towards a transition state leading to the ejection of HD2(+) or D3(+). The formation of such a long-lived neutral D2 moiety within a hydrocarbon molecule interprets well the recent experimental findings of the long lifetime of doubly charged energized hydrocarbon molecules prior to the ejection of H3(+).