Ayres was born along the Mohawk River in upstate New York, the son of a small-town doctor who raised several sons for professional life--Romeyn was singled out for a military career and was tutored rigorously in Latin by his father.  Ayres graduated from the US Military Academy in 1847, placing 22nd out of 38 (his class included future Confederate Generals A.P. Hill, George Steuart and Henry Heth, as well as future Union Generals Ambrose E. Burnside, John Gibbon and Charles Griffin). He served in Mexican garrison postings after graduation, having missed the fighting in the Mexican War.  

During the 1850s, Ayres served in garrisons in the East and on the frontier. He developed the usual Regular Army observance of regulations, but retained a common-sense rebelliousness, a paradoxical streak that stayed with him throughout his career. On a march in Texas, during a few days' rest he happened to pitch his camp near the permanent command of an officer who outranked him.. This officer was a letter-of-the-law man about Army Regulations, and had his reveille "at daybreak." Ayres had always liked to sleep in, but the senior officer assumed command over Ayres, and ordered him to comply with the Regulations.

After an interview with his superior, Ayres retired to his camp and issued the following order, sending the officer a copy:

Company Orders:

Until further orders, daylight in this camp will be at six o'clock.

R.B. Ayres

After the start of the Civil War he was promoted to Captain, 5th United States Artillery in May 1861, and was assigned to command its Battery E. He led the unit in the First Bull Run Campaign, and was heavily involved in the Battle of Blackburn's Ford, which was a precursor to the larger First Battle of Bull Run. In that battle his guns were held in reserve, and he did not see action. 


In October 1861 he was named as Chief of Artillery for Brig. General William F. Smith's Division, which would become part of the Army of the Potomac's VI Corps. He would hold this position for over a year, and fought in the Spring 1862 Peninsular Campaign, the Seven Day's Battles, and the Antietam Campaign.  In November 1862 he was promoted to Brigadier General, US Volunteers and made Chief of Artillery for the entire VI Corps.  At the December 1862 Battle of Fredericksburg, he commanded his Corps cannons as they made up part of the formidable Union artillery position on Falmouth Heights.


After three months on sick leave recuperating from lameness caused by an injury he received when his horse fell, he was given command of a brigade of infantry, the Fifth Corps' First Brigade of the Second (Regular) Division, in April 1863. In the subsequent May 1863 Battle of Chancellorsville, his unit was only lightly engaged. In late June of that year he was advanced to command the Division itself, due to the reshuffling of his superior officers (Corps commander Maj. General George G. Meade was given command of the Army of the Potomac, and previous division commander Brig. General George Sykes now command the V Corps). 


In the Battle of Gettysburg (July 1-3, 1863) he led the Division of Regulars into the maelstrom of the Wheatfield Area in the 2nd Day of the Battle. He committed his troops to bolster the flagging Union troops, which were under attack from James Longstreet's Corps. He fed the Regulars into the Rose Woods, where they encountered first Union troops retreating from the Peach Orchard, then pursuing Confederates, who threatened to flank and surround the Regulars. He then ordered a retreat, which saved the Division. His men rallied just north of Little Round Top, where they remained for the rest of the Battle. He would remain with the V Corps for the rest of the war, leading his Division in the suppression of the New York City Draft Riots, and in the Mine Run Campaign.


In March 1864 the Army of the Potomac was reorganized, and General Ayres was reduced to commanding the 4th Brigade of the V Corps' 1st Division. After leading the brigade though the initial battles of Ulysses S. Grant's 1864 Overland Campaign, he again ascended to Divisional command, leading the V Corps 2nd Division through the Petersburg Campaign and to the surrender of Confederate forces at Appomattox in April 1865. During the later part of the war he was General Joshua Chamberlain's immediate superior officer, and he praised General Chamberlain highly in his reports. His war services won him brevets of Major General in both the Regular Army and the Volunteers. 


Upon his muster out of the Volunteer Army in April 1866 he was promoted to Lieutenant Colonel of the 28th United States Regular Infantry. He would continued to serve in the Regular Army after the War, performing garrison duty on a number of posts in the South. In 1879 he was promoted to Colonel of the 2nd United States Artillery, and was serving on active duty on Fort Hamilton, New York City, New York when he died in 1888.