The law follows more than 100 years and 200 failed attempts by US lawmakers to pass anti-lynching legislation.
The Emmett Till Antilynching Act is named for the black teenager whose brutal murder in Mississippi in 1955 helped spark the civil rights movement.
Perpetrators of a lynching - death or injury resulting from a hate crime - will face up to 30 years in jail.
Mr Biden said: "Thank you for never giving up, never ever giving up.
"Lynching was pure terror to enforce the lie that not everyone, not everyone, belongs in America, not everyone is created equal."
He added: "Racial hate isn't an old problem - it's a persistent problem. Hate never goes away. It only hides."
The bill was passed unanimously in the Senate earlier this month. The House had voted overwhelmingly in support of the legislation last month. Three Republicans voted no: Thomas Massie of Kentucky, Chip Roy of Texas and Andrew Clyde of Georgia. They argued that it was already a hate crime to lynch people in the US.
Lynching is murder by a mob with no due process or rule of law. Across the US, thousands of people, mainly African Americans, were lynched by white mobs, often by hanging or torture, in the 19th and 20th Centuries.
Some 4,400 African Americans were lynched between 1877 and 1950, according to the Equal Justice Initiative. Those who participated in lynchings were often celebrated and acted with impunity.
"Lynching is a longstanding and uniquely American weapon of racial terror that has for decades been used to maintain the white hierarchy," the bill's sponsor, Illinois Congressman Bobby Rush, said ahead of its passage.
In 2020, following the murder of George Floyd by a police officer in Minneapolis, the House passed an earlier iteration of the bill, but it was blocked in the Senate.
Many racial justice advocates have described the death of Floyd, as well as the murder of Ahmaud Arbery - who was hunted down and shot by three white men in Georgia in 2020 - as modern-day lynchings.
By Chelsea Bailey, BBC News
One would be forgiven for thinking that lynching was already a hate crime in the United States. After all, it's been decades since Billie Holiday's haunting ballad, Strange Fruit, told of "black bodies swingin' in the Southern breeze", and mobs of white Americans no longer line up to take commemorative photos beneath hanging trees.
But that's exactly why the Emmett Till Antilynching Act is so significant. Lynchings may not look the same way they did in the past, but that doesn't mean they don't happen.
Many regard the murders of black Americans James Byrd Jr, Ahmaud Arbery and George Floyd as modern-day lynchings.
The bill signed into law on Tuesday bears the name of a black teenager whose mother held an open-casket funeral to force the world to see the gruesome effect of racial violence in the US.
For many, the fact that it took Congress more than 65 years to pass the legislation would seem to speak volumes about America's tacit stance on the subject.
The first anti-lynching bill was introduced in 1900, by George Henry White, the only black man then serving in Congress. The bill failed and continued to fail for more than 120 years.
Lynching is not unique to America, but its use for racial terror and suppression is. According to the Equal Justice Initiative, more than 4,300 black Americans were lynched between the post-Civil War Reconstruction period and 1950. And those are just the murders that were documented.
Confronting America's gruesome past continues to be a subject of contention. Sometimes, it can take more than a century.