The bill's sponsor, Democratic Senator Martin Sandoval of Cicero, says the ban would save lives on Illinois roads.
The legislation was changed from a previous bill to allow texting if a car is on the side of the road and not moving.
The bill will now return to the Illinois House for approval of the change.