Consider the following situation,
A batsman's bat breaks while hitting the ball after which a piece of the bat flies in the air, hits the stumps and the bails fall down.
Is this a dismissal by hit wicket?
Yes, the batsman is out.
Refer first to Law 35 (Hit Wicket)
- Out Hit wicket
(a) The striker is out Hit wicket if, after the bowler has entered his delivery stride and while the ball is in play, his wicket is put down either by the striker’s bat or by his person as described in Law 28.1(a)(ii) and (iii) (Wicket put down).
We need to check Law 28 to check the exact details of what constitutes 'Wicket put down'
- Wicket put down
(a) The wicket is put down if a bail is completely removed from the top of the stumps, or a stump is struck out of the ground,
(i) by the ball,
or (ii) by the striker’s bat if he is holding it or by any part of his bat that he is holding,
or (iii) notwithstanding the provisions of Law 6.8(a), by the striker’s bat in falling if he has let go of it, or by any part of his bat becoming detached
That last line "or by any part of his bat becoming detached" covers the situation in the question. The batsmen is out.
Yes this is the dismissal by hit wicket:
In the first innings of the 3rd Test in the 1921 Ashes series, at Headingley, Andy Ducat, playing in his only Test for England, fended at a fast ball bowled by Australia's Ted McDonald. Ducat's bat broke, and a splinter flew back and dislodged a bail, the ball being caught behind by a slip fielder. Ducat was given out "caught", although it seems likely that he could also have been given out "hit wicket".
Later in 1921, in the 2nd Test between Australia and South Africa at Old Wanderers in Johannesburg, McDonald dismissed Billy Zulch in a similar fashion, breaking the batsman's bat so that fragments flew back to dislodge a bail, and Zulch was given out "hit wicket".
After these incidents, the MCC clarified that whole bat must break the wicket for the batsman to be given out "hit wicket". However, effective 1 October 2010, this law has been changed to allow a batsman to be dismissed "hit wicket" if a splinter, or part of his bat, breaks the wicket.
So the batsman is given out in such cases.