Close the basement door and lock any pets in a room away from your basement.
Enter the basement, closing the door behind you. Open any basement windows, removing screens if necessary. Set a cracker with peanut butter on the window ledge.
Leave the basement, shutting door behind you. Stay out for at least two hours, or until morning if you discover the squirrel at night. The squirrel will most likely discover the cracker, and leave through the window.
Seal whatever opening the squirrel used to gain access to the basement. Squirrels can squeeze in through small openings, and will chew their way in if they are really determined.
If you do not have windows in your basement, create a pathway to the nearest door or window leading out of the house. Close all other doors, and use furniture to block off any other paths the squirrel could take.
Set a trail of peanut butter-smeared crackers leading from the basement to the open window or door. Open the basement door, and stay away for at least two hours. If it is nighttime, wait until morning to try this because the squirrel will not leave in the dark.
Check the exterior of your house thoroughly. Fix any broken screens, openings next to pipes or wires, holes in the roof or other small holes that squirrels could use to gain access to your home.
Call your local animal shelter if the squirrel does not leave. They will bring traps to catch and remove the squirrel.