Lincoln wasn't on the ballot of slave states in 1860, but then, too, neither were John Bell, Stephen A. Douglas, and John Breckenridge. In fact, none of those candidates were on "the ballot" of any state. And yet Lincoln still won.
The reason for that is that because there wasn't a "ballot" in the way that we think of them today -- if you go to an election in present-day America, most of the time you get a sheet that's provided by the county or parish you live in, or maybe get ushered into a voting machine, but the candidates have been vetted and placed on the ballot after some sort of bureaucratic process. And then you go mark your ballot or pull your lever in secret, or with a decent amount of privacy.
But that's not how elections worked in this era -- instead, a voter would go to the polls and either write in a slate of candidates, or more likely use a printed ballot torn out of a newspaper or simply printed by the local newspaper owner/postman/general store owner. Here's an 1816 example and a fancy one with an engraving from 1848.
To vote in the election of 1860 -- and the elections before it -- you would be expected to bring your ballot to the polls, walk into some sort of voting center (often the local newspaper office/post office/general store), swear or affirm who you said you were, and cast your ballot in front of election judges, and in full view of the community. Keep in mind that printers often printed ballots on different sizes of paper or different colored paper, and so the notion of a "secret ballot" is right out; also, election violence, though not as common in the South as it would be out West, is a constant threat. The Missouri painter George Caleb Bingham's The County Election is attempting to pack a lot into a ... well, it's really big, if you're ever in St. Louis go see it ... limited space, so the action is compressed, but not inaccurate.
In an environment like that, it's not surprising there were vanishingly few votes for Lincoln in the South.
The Constitution only has a couple of things to say about elections:
Article I, Section 4: Elections
The Times, Places and Manner of holding Elections for Senators and Representatives, shall be prescribed in each State by the Legislature thereof; but the Congress may at any time by Law make or alter such Regulations, except as to the Places of chusing Senators.
and the 12th Amendment (I bolded text that was changed later)
The Electors shall meet in their respective states and vote by ballot for President and Vice-President, one of whom, at least, shall not be an inhabitant of the same state with themselves; they shall name in their ballots the person voted for as President, and in distinct ballots the person voted for as Vice-President, and they shall make distinct lists of all persons voted for as President, and of all persons voted for as Vice-President, and of the number of votes for each, which lists they shall sign and certify, and transmit sealed to the seat of the government of the United States, directed to the President of the Senate; -- The President of the Senate shall, in the presence of the Senate and House of Representatives, open all the certificates and the votes shall then be counted; -- The person having the greatest number of votes for President, shall be the President, if such number be a majority of the whole number of Electors appointed; and if no person have such majority, then from the persons having the highest numbers not exceeding three on the list of those voted for as President, the House of Representatives shall choose immediately, by ballot, the President. But in choosing the President, the votes shall be taken by states, the representation from each state having one vote; a quorum for this purpose shall consist of a member or members from two-thirds of the states, and a majority of all the states shall be necessary to a choice. And if the House of Representatives shall not choose a President whenever the right of choice shall devolve upon them, before the fourth day of March next following, then the Vice-President shall act as President, as in case of the death or other constitutional disability of the President.-- The person having the greatest number of votes as Vice-President, shall be the Vice-President, if such number be a majority of the whole number of Electors appointed, and if no person have a majority, then from the two highest numbers on the list, the Senate shall choose the Vice-President; a quorum for the purpose shall consist of two-thirds of the whole number of Senators, and a majority of the whole number shall be necessary to a choice. But no person constitutionally ineligible to the office of President shall be eligible to that of Vice-President of the United States.
(The 12th Amendment stuff about the "president of the Senate" -- that is, the Vice President -- having the authority to open electoral votes is what the insurrectionists who stormed the Capitol on Jan. 6 were trying to prevent, by the way.)
Anyhow -- the way that states choose their electors has been up to states since the Constitution was written, because it's just not in the Constitution (this is why we get outliers like Nebraska awarding electors by congressional district, and so forth). It wouldn't be unconstitutional to keep a candidate off a ballot by state fiat, but it would certainly be illegal and result in numerous legal challenges if a state tried that -- there are other extralegal means of throwing an election (e.g. a legislature could select faithless electors), but it's more complicated than it seems looking at 1860.
For some more reading on this: