The letter was intercepted earlier this week before it reached the White House.
The woman was taken into custody by US Customs and Border Protection officers at the Peace Bridge border crossing near Buffalo and was expected to face federal charges, the officials said. Her name was not immediately released.
The letter addressed to the White House appeared to have originated in Canada, the Royal Canadian Mounted Police have said.
It was intercepted at a government facility that screens mail addressed to the White House and President Donald Trump and a preliminary investigation indicated it tested positive for ricin, according to the officials.
There have been several prior instances in which US officials have been targeted with ricin sent through the mail.
A Navy veteran was arrested in 2018 and confessed to sending envelopes to Mr Trump and members of his administration that contained the substance from which ricin is derived. The letters were intercepted, and no one was hurt.
In 2014, a Mississippi man was sentenced to 25 years in prison after sending letters dusted with ricin to President Barack Obama and other officials.