Battery M is referenced on a War Department marker at Antietam and honored by a monument at Gettysburg.

1861
January In Texas
April Moved to New York, then to Fort Pickens, Fla.
June Ordered to Washington, D.C. Attached to Richardson’s Brigade, Tyler’s Division, McDowell’s Army, Northeast Virginia
July 16-21 Advance on Manassas, Va.
July 17 Occupation of Fairfax Court House
July 21
Battle of Bull Run
August Duty in the Defenses of Washington, D.C. attached to Franklin’s Brigade, Division of the Potomac
October Attached to Franklin’s Division, Army of the Potomac
1862
March Moved to the Virginia Peninsula. Attached to Artillery Reserve, Army of the Potomac
April 5-May 4 Siege of Yorktown
May 4 Near Williamsburg
May Attached to 1st Brigade, Horse Artillery, Artillery Reserve, 5th Army Corps, Army of the Potomac
May 27 Hanover Court House
May 27-29 Operations about Hanover Court House
June 25-July 1 Seven days before Richmond
July 1 Malvern Hill
July-August At Harrison’s Landing
August 5 Action at Malvern Hill
August 16-23 Moved to Fortress Monroe, thence to Alexandria
September 6-22 Maryland Campaign. Attached to Artillery, Pleasanton’s Cavalry Division, Army of the Potomac
September 7 Poolesville, Md.
September 9 Barnesville
September 9 Monocacy Church
September 10-11 Sugar Loaf Mountain
September 12 Frederick
September 13 Catoctin Mountain
September 16-17
Battle of Antietam

Battery M was commanded at Antietam by Lieutenant Peter C. Hains (USMA June 1861)

From the War Department marker at Antietam:

Horse Battery M, 2d U.S. Artillery crossed the Antietam, by the Middle Bridge, in the forenoon of the 17th, and, preceded by the 4th Pennsylvania Cavalry, Col. Childs Commanding, and Battery A, 2d U.S. Artillery, advanced by the road to this point and went into position, one section on the right of the road, the other on the left. The battery was subjected to a heavy fire from the Confederate Artillery on Cemetery Hill, and from infantry skirmishers posted behind fences and stone walls. After losing three men killed the battery was relieved by Battery K, 5th U.S. Artillery, and withdrawn to replenish ammunition. At about 5 P.M., it returned and went into position in the right of the road, its left a few feet from this point, and directed its fire at the Confederate Infantry on the Piper Farm, which was continued until nearly dark when it recrossed the Antietam.

September 19 Shepherdstown Ford
October 1 Shepherdstown and Martinsburg
October 9-12 Pursuit of Stuart into Pennsylvania
October 12 Mouth of Monocacy and White’s Ford
November 1 Philomont
November 2-3 Union, Bloomfield and Upperville
November 5 Barbee’s Cross Roads
November 7 Waterloo Bridge
November 10 Corbin’s Cross Roads, near Amissville
December 12-15
Battle of Fredericksburg
1863
February Attached to Reserve Brigade, 1st Division, Cavalry Corps, Army of the Potomac
April 27-May 6 Chancellorsville Campaign
May 9 Stevensburg
June Attached to 1st Brigade, Horse Artillery, Army of the Potomac
June 9
Battle of Brandy Station 

Commanded by Lieutenant Alexander C. M. Pennington

June 21 Upperville
June 30 Hanover, Pa.
July 1-3
Battle of Gettysburg

The battery was commanded by Lieutenant Alexander C.M. Pennington and brought six 3″ Rifles to the field, losing one officer wounded.

From the monument::

July 2. Engaged with the Confederates at Hunterstown

July 3. Engaged in Brig. General Custer’s Brigade with Major General J.E.B. Stuart’s Confederate Cavalry on the right of the Union Army”

July 2 Hunterstown
July 5 Smithburg
July 6 Williamsport and Hagerstown
July 8 Boonsboro
July 12-13 Hagerstown
July 14 Williamsport and Falling Waters
September 13-17 Advance to the Rapidan
September 21-23 Reconnaissance across the Rapidan
October 9-22 Bristoe Campaign
October 10 James City, Bethesda Church and near Culpeper
October 11 Morton’s Ford, Brandy Station; Near Warrenton, White Sulphur Springs
October 17-18 Groveton
October 19 Gainesville, Buckland’s Mills and Catlett’s Station
November 7-8 Advance to line of the Rappahannock
November 26-December 2 Mine Run Campaign
November 26 Morton’s Ford
1864
May 4-June 12 Rapidan Campaign
May 5-6 Todd’s Tavern
May 6-7
Battle of the Wilderness
May 8 Alsop’s Farm
May 9-24 Sheridan’s Raid to the James River
May 9-10 Beaver Dam Station
May 11
Yellow Tavern and Ground Squirrel Church
May 12 Brook Church or Richmond fortifications
May 26-28 On line of the Pamunkey
May 27 Demonstration on Little River, Hanovertown
May 28 Haw’s Shop
May 28-31 Totopotomoy
June 1-7
Cold Harbor
June 7-24 Sheridan’s Trevillian Raid
June 11-12 Trevillian Station
June 12 Mallory’s Cross Roads
June 21 Black Creek or Tunstall Station and White House or St. Peter’s Church
June 29-August 5 Siege of Petersburg
August 7-
November 28
Sheridan’s Shenandoah Valley Campaign. Attached to Horse Artillery, Army of the Shenandoah, Middle Military Division
August 17 Winchester
August 25 Near Kearneysville
September 18 Abraham’s Creek, near Winchester
September 19
Third Battle of Winchester (Opequan)
September 20 Near Cedarville
September 21 Front Royal
September 22 Milford
September 29 Waynesboro
October 8-9 Tom’s Brook
December 19-22 Expedition to Lacey’s Springs.Attached to Reserve Horse Artillery, Army of the Shenandoah
1865
February 27-
March 25
Sheridan’s Expedition from Winchester
March 2 Occupation of Staunton and action at Waynesboro
March 28-
April 12
Appomattox Campaign
March 30-31 Dinwiddie Court House
April 1
Five Forks
April Moved to Washington, D.C., and duty there attached to Horse Artillery Brigade, 22nd Army Corps
August Moved to Fort McHenry, Baltimore, Md.