All the education the young candidate for military honors had was only such as he had obtained at the district school, and the examination for admission was considered a very trying ordeal, though it included only the branches taught in the common schools. He "brushed up" his studies, and as he was always cool and self-possessed, he did not fail from embarrassment, as many do on such occasions, but was passed and admitted. Of the class of eighty-seven only thirty-nine were graduated. In rank Grant was the twenty-first, indicating about the average ability.
As a cadet he was popular with his comrades. He was honest, fair, and square, and was especially careful of the rights of others. The horse had been a favorite with him from his early childhood, and at the Academy he was distinguished as a bold and fearless rider. He was sober and rather dignified in his manner. The name given to him by his parents was "Hiram Ulysses;" but the Congressman had made a mistake in presenting the nomination, and at West Point he was known as "Ulysses Sidney." Failing to correct the error, he accepted the initial S., but made it stand for "Simpson," after his mother. The first name was suggested by an elderly female relative, who appears to have read the Odyssey, and appreciated its hero. The initials of his name as it finally stood had a national significance, which the newspapers were not tardy in using at the time of his first decided victory.
He was graduated in 1843, and appointed brevet second lieutenant in the Fourth Regiment of Infantry. The engineers and the cavalry are considered more desirable arms of the service than the infantry, and the best scholars at the Military Academy are assigned to them. Grant's rank placed him in the latter. His regiment was sent to Jefferson Barracks, St. Louis. Frederick T. Dent, his classmate, was in the same command, and resided in the vicinity. He was invited to the house of the Dents, where he made the acquaintance of Miss Julia T. Dent, who became his wife five years later.
In 1845, the events which led to the Mexican War assumed form, and Grant's regiment was ordered to Corpus Christi, where he was commissioned as a full second lieutenant. His post was situated at the mouth of the Rio Nueces, between which and the Rio Grande was a triangular section of territory claimed by both governments; and this was the nominal subject of dispute between the United States and Mexico. General Taylor, commanding about four thousand troops, was ordered to move his force to the Rio Grande, on which the Mexicans had concentrated an army. A body of United States dragoons, commanded by Captain Thornton, was surprised by an overwhelming force of the enemy, and all of them killed, wounded, or captured. This event fired the blood of the soldiers, as well as of the people of the country, and Taylor crossed the river with the main body of his little army.
The Mexican generals declared that the advance of Taylor into the disputed territory was an act of war, and active hostilities had commenced. While the general was hastening to reinforce one of the forts attacked, he came upon the Mexicans drawn up in order of battle at Palo Alto. An action, mostly with artillery, followed, and the enemy were defeated and driven from the field. It was the first battle fought in thirty-one years with any foe other than Indians, by American soldiers. Grant was in that first conflict of half a century, as he was in the last ones.
The Mexicans had fled from this first considerable battle of the war to Resaca de la Palma, where they had established themselves in a strong position. Taylor attacked them the next day, and though their force was triple that of their assailants, they were again defeated and routed. The Mexicans fought with dogged courage, however they may be judged from the events of the war. Three months later, General Taylor marched upon Monterey with an army reinforced to 6,000 men. It was strongly fortified, but the city was captured after a hard-fought battle.
In the midst of the conflict in the town, while the Mexicans were disputing its possession from the windows of the strongly constructed houses, the ammunition of the brigade to which Grant was attached was exhausted, and it became necessary to send for a fresh supply. It was a service of extreme peril, and a volunteer was called for to perform it. Grant was a bold rider, and he promptly offered himself to execute the dangerous mission. Mounting a very spirited horse, he resorted to the Indian fashion of hanging at the side of his steed so that the body of the animal protected him against the shots from the windows, and he passed safely through the street. With a sufficient escort he succeeded in conveying a load of ammunition to the point where it was needed.
Soon after the battle of Monterey, Grant's regiment was sent to Vera Cruz to reinforce the larger army that was to march under General Scott to the "Halls of the Montezumas." Lieutenant Grant, as a careful, substantial, and energetic officer, was selected for the important position of quartermaster of the Fourth Regiment. The army proceeded on its uninterrupted career of victory till the capital of Mexico was in its possession. The heights of Cerro Gordo were stormed and carried, and Grant, as usual, was in the thickest of the fight.
The first considerable obstacle after the capture of Vera Cruz having been removed, the army proceeded on its march to the City of Mexico, occupying Jalapa and Castle Perote on the way; but at Puebla the forces were so reduced by sickness, death, and the expiration of enlistments as to compel a halt. For three months General Scott was compelled to wait for reinforcements; but when he could muster 11,000 effective men, a very small number for the conquest of a country, he resumed his march, and in August arrived in the vicinity of the capital. Outside of the causeways leading to the city were the strongholds of Chapultepec and Cherubusco, and batteries mounting a hundred guns.
Chapultepec was a fortification one hundred and fifty feet above the average level of the ground. A front of nine hundred feet bristled with cannon. Behind it was a mill called El Molino del Rey, fortified and garrisoned, which defended the approach to the castle. The capture of this work was assigned to General Worth, to whose command the Fourth Regiment belonged. The assault was a desperate one, for it was "the last ditch" of the Mexicans; but it was carried, though the assailing force lost one-fourth of its number in the assault. "Second Lieutenant Grant behaved with distinguished gallantry," is the official report of his conduct. Though custom and the precedents of the service permitted the quartermaster to remain at a safe distance from actual fighting in charge of the baggage trains, Grant never availed himself of this immunity from personal peril, but retained his place with the regiment.