IIRC my professor even said that this purchase was almost as important as the slavery debate in the senate. He basically went on about how the purchase was important to the South’s dream of building a southern transcontinental railroad and that the gold from California that would run through this southern route would tip the scales in their favor. I’ve been debating with a few friends recently who are passionate on the topic and would like to be more informed. Sources would be great as well. Thanks.
This is obviously a huge topic, basically the entire political history of the United States from 1836-60. I can only hit the high points for an overview, but we can always dig down in follow-ups.
So: this is far from the consensus. The normal antebellum surveys going back decades treat Gadsden as a footnote, largely noting it in that it's the first time the United States ever negotiated to acquire more land and then Congress took a pass on some of that land...and specifically because it would be more land for slavery. The lengthiest treatment I've seen of it is in The Ordeal of the Union, from 1947. Ordeal is an extremely detailed, interesting book but it doesn't argue for Gadsden as the key point and even if it did I wouldn't start there for my historiography.
But here is a railroad angle to the Civil War and it's still all about slavery. A southern route for the transcontinental railroad would emphatically be a tremendous boon for slavery. It would have guided development through the southwest, from enslaving states outward and so tend to be used mostly by and for the spread of white enslavers. Having a cheaper, faster way to go west would have made the development of slave labor camps in Southern California far more feasible, as well as increased the accessibility of both lesser-known cotton growing areas and expansion into enslaved labor for mining. Certainly that would have been far more realistic than Gadsden's bloody plan to march three thousand enslaved people through the hellish desert by foot and put the survivors to further torture at the far end to produce cotton. Had that fantasy come to pass -and Gadsden asked the state of California for leave to do it- or the railroad went through, most probably Southern California would have been made its own state with slavery. A proposal to divide the mostly white, Anglophone northern California from the less so SoCal made it through the state legislature and went west for approval in Washington anyway. It just took until 1860, at which point the Congress had other problems.
Those considerations apply whether Gadsden could have bought the land off Mexico or not, though. At the time it was generally believed you had to have that parcel to get a railroad through to either the Gulf of California -where Gadsden was trying to get a port and failed- or to somewhere in the vicinity of San Diego. Conversely, a northern route from somewhere in Wisconsin or the environs of Chicago brings similar benefits of speeding white colonization and the spread of the labor system dominant at the eastern terminus westward. If more Yankees go west, they're going to not bring enslaved people with them and be disinclined to vote slavery in thereafter. There's a bunch of maneuvering about this in the early 1850s, all of which comes to a head in the real issue that kills the Second Party System likely for good.
The murder weapon here is a compromise. Southerners have the votes to veto a northern Pacific railroad. Northerners have the votes to return the favor. A proposal to just do the lot of 'em runs up hard against the idea that it's too much money to ever be possible. So why not split the difference and run a railroad from St. Louis out? Call it the central route. Missouri is a slave state, but it's been steadily trending toward less slavery. St. Louis has a large immigrant population who are slavery-adverse and has grown fast enough to challenge the heavily enslaved districts for control of the state's future. It's right across the river from free Illinois. Theoretically, everyone can say this is a fair deal and it would be a boon to the economies of states on both sides of the slavery divide. Politicians from those states tended to make concessions to slavery that kept the nation going for decades, albeit with unconvincing fig leaves that eventually let them paper over the real issue once the inciting event drops into the rear view mirror.
It's a plan and it doesn't get done in the 1850s, but part of getting it done requires organizing the territory west of Missouri. Until that point, this is literally Indian Country; it says so on white maps. The land between there and the Rockies, and from Texas up to Canada, is legally unorganized -so no government by whites- and parceled out into reservations. The white presence is limited to authorized Indian Agents who conduct trade with the Native Americans and the United States military. Whites can travel across it along certain established emigrant routes, but that's it and they're meant to have nothing to do with the people unfortunate enough to have gotten on what whites deem their land before they got there...even if they'll also say that land is meant to belong to the First Nations in perpetuity.
Building a railroad is going to require government along its route. The railroad will require infrastructure that will naturally produce small towns along the way, plus the workers building it will need the usual facilities for the period. Having civilians do this means they need to be allowed into the territory on an ongoing basis, permitted to remain, and basically go about their lives as settler colonizers. They are not, by and large, interested in going off the map into some wild west where anything goes.
So to grease the wheels, Stephen Douglas introduces the Kansas-Nebraska Act. His thinking is that once the land is organized, it'll be much harder to resist pressure to put a railroad through. The problem here is the Missouri Compromise, which bans slavery from all the land Douglas wants to organize. It's been on the books for thirty years and in white northern minds stands as a kind of constitutional promise that when the gates are opened to genocide that land, those gates are open for them and emphatically not for black people, enslaved or otherwise. So they will not take its repeal lightly. Douglas knows that and tries to avoid any kind of repeal, which would be easy given there's no enslavers present on the land to contest the issue...except that the enslavers live literally right next door. The most enslaved part of Missouri directly abuts the future Kansas.
On the Missouri Valley, in all those slave labor camps growing hemp and wheat, a free jurisdiction next door is a nightmare. Running a railroad through it would make things worse still. Not only would abolitionists be "meddling" with their enslaved people and convincing them that a life of torture, rape, destroyed families, and unending pain and terror is somehow not a thing they should embrace with every atom of their beings. Enslaved people would be "enticed" to run off. Once that's allowed, then slavery is destabilized and might well collapse from a mix of panic selling, loss of value for enslaved bodies (which leads to panic selling), and ultimately a race war they deem inevitable absent slavery to control black Americans. They're not going to allow that and they have a powerful senator in Washington, David Rice Atchison, on the case. He and his allies, powerful Southern senators who happen to also all live together on F Street, can kill Douglas' bill. They force him to make concessions, which Douglas tries to finesse. Then they get outmaneuvered by another Southern senator who puts in his own amendment for a full-on, explicit repeal of the Missouri Compromise. Once that's on the table -F Street was willing to let Douglas get away with something less direct- it's the only viable option for all of them. Douglas sees the bill rammed through the Senate and then Alexander Stephens does the same in the House.
But it's all done in so much secrecy, with the bill constantly changing -there are four different versions of the Kansas-Nebraska Act and Douglas tried to pretend his first revision was actually not a revision because the clerk lost some papers- that it prompts a fairly massive reaction in the North. Getting the thing through Congress takes months that help it grow, as do the efforts of antislavery Senators and Congressmen to raise the alarm. Cue a fairly intense slavery fight that isn't otherwise unusual, except that it never really stops.
Stephen Douglas accidentally made sure of that, though he was always eager to blame everyone else. The way he pretended he hadn't massively caved to proslavery pressure was by saying that he just wrote a bill to let the white colonizers of the territory vote slavery in or out. But Douglas did not specify in his bill the status of slavery in the territories until that point, or even when the vote could be held. Antislavery Yankees promptly get together an organization, the Emigrant Aid Society, to subsidize colonization of Kansas by antislavery whites who will vote to keep slavery out. Proslavery whites down in Missouri -and for a while just Missouri, but eventually from the broader South- organize paramilitary companies to stop them, or at least stop them from voting. Their preferred weapon is intimidation, but if that doesn't work they come over by the thousands with bowie knives, guns, and cannons to settle the issue by force.