Was it ever legal to dunk a ball from the free throw line in the NBA?

It has and always will be legal to dunk from the free throw line. No one has ever attempted to do so in a non NBA dunk contest, as the odds of doing so with about 7 people in the way is very unlikely. Most people get a head start, as well, and there is little chance of that happening in an NBA game.