Trapped Between the Lash and the Gun, by Arvella Whitmore (1999), is written explicitly (I know this from the author's note, but I could have figured it out myself) to teach primarily about the horror of slavery, and secondly, to teach how the reverberations of slavery affect African Americans in the present.
In the present, an urban black boy named Jordan is getting in over his head with the local gang; he is treading on very thin ice. To get the money the gang leader wants him to produce, he steals the ancestral watch from his grandfather....but before he can pawn it, it takes him back through time to a plantation where he is assumed to be an errant slave. Through Jordan's progressively more horrified eyes, the reader sees the human misery and evil of slavery, and he learns how the human spirit can triumph despite it all. And he helps his ancestor escape, and comes back to the future having Learned Valuable Life Lessons, defies the gang, and ends up getting shot (but not fatally).
He then learns that his missing dad is in prison for embezzlement, something his grandfather explains is a consequence of the systemic oppression of black people in America causing his father to give up on himself, linking this to reasons why boys join gangs (I feel there could have been a more powerful point made; this felt like a somewhat facile fizzle), and then Jordan moves out of the inner city.
I guess every kid should read at least one "this is the horror of slavery book" and the point of the past not just being past is one I think could be made more often, but there really wasn't anything about this particular book that transcended its didactic point. Although the vivid descriptions were in fact extremely vivid, and gripping, and although several of the supporting characters were appealing, there wasn't quite enough to Jordan's character to make me care that much about him. And so the book felt rather flat. If you are looking for a quick intro to horrors of slavery from a modern kids perspective, it's not bad at getting its points across, but if you are looking for a really good book for middle grade kids I'd recommend instead, Delia Sherman's Freedom Maze, and for older readers, Zetta Elliott's A Wish After Midnight, or Octavia Butler's Kindred. (All of these are time travel, and use the tension of that situation to much greater effect).
Here's the Kirkus review if you want another opinion.
Frankly, the most interesting part of the book was the author's note, in which she tells how she found out that she herself was not just white, as she'd always believed, but a descendent of slaves herself. The true story of her ancestors was fascinating and emotionally more stirring than the book itself.