It doesn't come from a derogatory term.
It appears to be a combination of two terms that mean new. Span came from Old Norse and spick came from Dutch.
ORIGIN late 16th cent. (in the sense ‘brand new’): from spick and span new, emphatic extension of dialect span new, from Old Norse spán-nýr,
from spánn ‘chip’ + nýr ‘new’; spick influenced by Dutch
spiksplinternieuw, literally ‘splinter new.’
New Oxford American Dictionary - Mac Dictionary App
The derogatory term is much more recent.
ORIGIN early 20th cent.: abbreviation of US slang spiggoty, in the same sense, of uncertain origin: perhaps an alteration of speak the in ‘no speak the English.’
New Oxford American Dictionary - Mac Dictionary App