Janney is best known for her work on TV's "The West Wing."
ABC said she will appear as a character described only as "woman" in Tuesday's installment of "Lost."
In the episode called "Across the Sea," the network said, "The motives of John Locke are finally explained."
No other details were given about the episode other than it will also feature guest appearances by Mark Pellegrino as Jacob and Titus Welliver as the "man in black."
The show is to wrap up its sixth and final season May 23.