Kyle Lowry led Toronto with 29 points in his first game back after missing three with a bruised kneecap. Patrick Patterson finished with 17 for the Raptors in their fourth straight victory and seventh in eight games.
DeMar DeRozan added 17 points before leaving the game with a minute to play with a gash over his left eye. Toronto was missing starting forward Amir Johnson for the fourth straight game.
Henry Sims scored 22 points, Michael Carter-Williams added 19, and Thaddeus Young finished with 16 for the Sixers.
Valanciunas scored the Raptors' first points of the game, then grabbed a rebound on the Sixers' first shot, and scored on a dunk on a pass from DeRozan on Toronto's next trip down the floor.
The Raptors are headed to the postseason for the first time in six years, and are on pace to win both the Atlantic Division title and top their franchise record for wins of 47 - set in 2000-01 and 2006-07.
They were coming off a 102-98 win over the last-place Milwaukee Bucks on Saturday, and the Sixers - who recently tied the league record for most consecutive defeats in a single season with 26 - gave Toronto a decent game for much of the night.
The Raptors led by only a point midway through the third quarter before taking a 98-89 advantage into the fourth.
The Sixers trailed by just six points with 2:44 to play after Young made a 17-foot fadeaway jumper. But Lowry proved once again how valuable he is down the stretch, making consecutive baskets to give the Raptors a 10-point lead with 1:52 to play.
There were questions about Valanciunas playing Wednesday in the wake of his arrest. Coach Dwane Casey was asked about the issue before the game.
"We sent a message," Casey replied. "We sent a message that we don't condone it, we're disappointed in him. By playing him, we're not saying we're condoning it."
Valanciunas was arrested early Monday morning in Wasaga Beach, Ontario, and charged with having more than 80 milligrams of alcohol in 100 milliliters of blood. Police say they began investigating after a report that a vehicle went through a drive-thru with open beer bottles visible.
His first court appearance is scheduled for Collingwood on April 22. The 21-year-old is not required to attend so a lawyer will stand in for him. He could receive a suspension from the NBA, but that would be pending the results of a trial which would likely be during the offseason.
"It's a process," Casey said. "I thought you were innocent until you were proven guilty. He's innocent until he's proven guilty; until the process goes through the legal system, he's still a member of the team in good standing."
Johnson missed his fourth game with an ankle injury. Casey said the forward, who has dealt with injured ankles, isn't 100 percent, but "he's pretty close."
"Probably if he had to go tonight he probably could go, but again, we're trying to make sure, trying to get him ready for the next couple of weeks," Casey added.
The Raptors led for all but a few seconds of the first quarter, and went up by nine points when Lowry converted a three-point play with 23 seconds left. A three-pointer by Elliot Williams cut Toronto's advantage to 34-28 heading into the second.
The Raptors continued to build on their lead, and Patterson's three-pointer with just under three minutes to go in the second put Toronto up 62-49. The Raptors went into the dressing room at halftime up 68-60.
The Sixers opened the third with a 17-10 run, capped by Anderson's three-pointer with 6:23 to go that cut the Raptors' lead to just a point. The Raptors finished the quarter with a run to give themselves a nine-point lead with a quarter to go.
NOTES: The Raptors host the New York Knicks on Friday, then play the Pistons in Detroit on Sunday. They host Milwaukee on Monday then play their regular-season finale next Wednesday at Detroit.