In the movies, maybe.
How much of that was actually true?
Stuart knew about Brown from Kansas and apparently had even met him there, but his fighting in Kansas seems to have been against the Cheyenne Indians.
Stuart did join with Lee to crush Brown's Harper's Ferry raid back east.
It was an excellent movie but not good history at all.
1st Cavalry Regiment, Fort Leavenworth, Kansas Territory. Operations against the Cheyenne and against rabid abolitionists terrorizing the territory. Wounded July 1857 in skirmish with Cheyenne during a saber charge under his commander Sumner.
While seeking re-appointment with the Quartermaster dept, in Washington, DC, he volunteered to accompany R.E. Lee as aide-de-camp to Harper’s Ferry to secure the arsenal there. A man calling himself Isaac Smith led the group holding the arsenal. From his experiences fighting in Bleeding Kansas, he recognized and identified “”Old Ossawatomie Brown”—ie. John Brown.
It is a matter of public record. Not “the movies” of fantasist looney visions.