Pejorative comes from the root word ped-, the same root as words pedal and pedestrian where it means "foot". ped- means "to walk, stumble, or impair" which is where the negative meaning of pejorative comes from.
This is stolen from Mignon Fogarty's post.