Complex sentence: In May 1861, Shaw joined the 2nd Massachusetts Infantry as a second lieutenant, later taking part in the battles of Winchester, Cedar Mountain, and Antietam while with the 2nd Massachusetts Infantry.
Split into simpler sentences: In May 1861, Shaw joined the 2nd Massachusetts Infantry as second lieutenant. Shaw took part in the battles of Winchester, Cedar Mountain, and Antietam while with the 2nd Massachusetts Infantry.