I can understand why the former Confederate states still discriminated
against blacks starting from Reconstruction, but why did the North?
Before we get to formal Reconstruction, we can examine some actions of the federal government immediately following winning the U.S. Civil War as a model for how the nation was to treat free blacks. We immediately encounter General William T. Sherman's Special Field Order No. 15, popularly referred to as "40 acres and a mule", which set aside certain lands for free blacks to "possess" and govern themselves thereon. Tens of thousands of free blacks traveled to and settled on the "promised" land. Within 4 years the blacks had largely been removed from the land again, which was in large part was returned to pardoned property owners in the South. The federal government policy objectively used the then free blacks both for military and political purposes until those free blacks were no longer politically and militarily useful to the state.
Sherman's Field Order No. 15
The immediate effect of Sherman's order provided for the settlement of
roughly 40,000 blacks (both refugees and local slaves who had been
under Union army administration in the Sea Islands since 1861). This
lifted the burden of supporting the freedpeople from Sherman's army as
it turned north into South Carolina. But the order was a short-lived
promise for blacks. Despite the objections of General Oliver O.
Howard, the Freedmen's Bureau chief, U.S. president Andrew Johnson
overturned Sherman's directive in the fall of 1865, after the war had
ended, and returned most of the land along the South Carolina,
Georgia, and Florida coasts to the planters who had originally owned
it.
Although Sherman's Special Field Order No. 15 had no tangible benefit
for blacks after President Johnson's revocation, the present-day
movement supporting slave reparations has pointed to it as the U.S.
government's promise to make restitution to African Americans for
enslavement. The order is also the likely origin of the phrase "forty
acres and a mule," which spread throughout the South in the weeks and
months following Sherman's march.
Grouping entire populations into North and South is a perhaps improper here. It implies that all of the actual people in the North that were not also politicians and particularly the ruling class practiced discrimination against blacks. We remember John Brown and his sons before Reconstruction and the Boule after Reconstruction. Meaning people who self-identify with or are considered socially or politically black or white does not mean their politics are reflected in how an individual or group might blanket cast an entire "race" as having the exact same tendency to discriminate for or against a different "race". "Race" is in parenthesis because "race" is not defined by Public Law in the United States, see Is the term “race” defined by Public Law enacted by Congress of the United States there are nations where "race" is not used within governmental document, and there is no universally accepted definition of "race" either among individuals, scholars, or under international law.
Isn't it inconsistent for Northern whites to have believed earnestly
in, and championed, slavery's abolition, but remain racist against
blacks?
As with the previous inquiry, I would caution against accepting the premise of "Northern whites", as if that were a monolithic group having a single mission statement, which is not the case.
Even championing abolition does not equate to a purely charitable motive for seeking abolition. Nor does the mere abolition of "slavery" mean that the lowest rank of "white" person in the society is still not ranked above the highest "black" person under the global government of white supremacy. Joanna Brooks mentions being influenced by a certain definition of "whiteness" by Noel Ignatiev and John Garvey who are affiliated with the Race Traitor project:
The white race is a historically constructed social formation. It
consists of all those who partake of the privilege of white skin in
this society. Its most wretched members share a status higher, in
certain respects, than that of the most exalted persons excluded from
it, in return for which they give their support to a system which
degrades them.
While it is important here to note that "race" is also not related to science, though the period the question asks about is the beginning of "scientific racism", when exactly such a scientific definition was attempted, failed, but was widely accepted nonetheless.
There’s No Scientific Basis for Race—It's a Made-Up Label
Morton thought he’d identified immutable and inherited differences
among people, but at the time he was working—shortly before Charles
Darwin put forth his theory of evolution and long before the discovery
of DNA—scientists had no idea how traits were passed on. Researchers
who have since looked at people at the genetic level now say that the
whole category of race is misconceived. Indeed, when scientists set
out to assemble the first complete human genome, which was a composite
of several individuals, they deliberately gathered samples from people
who self-identified as members of different races. In June 2000, when
the results were announced at a White House ceremony, Craig Venter, a
pioneer of DNA sequencing, observed, “The concept of race has no
genetic or scientific basis.”
Scientific Racism Isn’t ‘Back’—It Never Went Away
It was Darwin’s half-cousin Francis Galton, who coined the term
“eugenics,” and his theories of biological determinism that bridged
Darwinian natural selection and human beings. Soon Herbert Spencer’s
phrase “survival of the fittest” became the zeitgeist of the era, and
the logic of Social Darwinism took second place only to capitalism as
the American civic religion. The moral imperative for the weak to
perish and the strong to survive was applied to the economy,
international relations, politics, social classes, and the hard
sciences. Just as America would rise above and crush the weaker
nations of Old Europe, so too would the races settle into a natural
order in which the dominant ethnicity of the elite class (Anglo-Saxon,
Germanic, and northern European) would prove with finality its
superiority over the lesser peoples (everyone else).
The overall point of the answer is that white supremacy is a political construct, a social formation by classes, a business; where an individual may or may not be "white" (see What are the legal requirements in the United States for being recognized under federal law as “white” or a “white” person?) though still profit from the business of white supremacy, in any era businesses adapt to or innovate the market, create new products, re-invent themselves. White supremacy shifted, or using a term whose origin is rooted in the notion of some modern scientists, adapted from application of physical chains to application of mental chains, i.e., academia, and continues to adapt today.
What If Reconstruction Hadn’t Failed? The pervasiveness of white-supremacist ideology in academia gave license to Jim Crow efforts for decades after the Civil War.
In this view, President Andrew Johnson—who did everything he could to
sabotage efforts on behalf of the formerly enslaved, and after his
impeachment in the House of Representatives, escaped removal from
office by one vote in the Senate—was portrayed as the hero who had
valiantly attempted to save the country from the specter of “Negro
Rule.” The men who opposed him were considered dangerous “radicals”
aimed at upsetting the racial hierarchy and making inferior people
citizens of the United States. Johnson, who was barely educated
himself—he learned to read in his late teenage years and to write just
a few years later—was held up as one of the country’s great
presidents.
The urgency to limit black advancement and create doubts about the
efficacy of black citizenship was derived from the doctrine of white
supremacy. Blacks of the era saw Birth of a Nation for what it was,
and organized protests in various venues where it was screened. But,
as noted, it was not only that movie’s presentation of
Reconstruction-as-horror-show that had to be confronted. The early
written history of the era put the weight of academia behind crude
formulations of racially based power politics; making the
pronouncements of blacks’ unfitness for citizenship a matter of social
science and, for some, pure science. These writings served late
19th-century and early 20th-century political and social
arrangements—disfranchisement, Jim Crow, and, for extremists,
lynching. Casting doubt on blacks’ innate capacities, they gave
license to question whether African Americans should, or could ever,
be successfully incorporated into the American polity. Very
importantly, it was to be left to whites to decide the question when,
and if, blacks would ever be eligible to exist with all the attributes
of citizenship in the United States. Blacks resisted this idea in the
streets and in scholarship.