Maybe you're talking about side-slipping!
That's a jazz term for when something gets moved up or down a half step in order to sound "outside" (chromatic). (I'm pretty much going to have to assume that this is jazz, or else I won't have a lot to talk about, because jazz has good labels for a lot of cool stuff!) Maybe your melody or chords are an example of this? It's hard to tell without context. Personally, I'm not an enormous fan of this label because it sounds like the theorist just gave up trying to explain what's going on in the music.
It could also (and probably more likely) be Tritone substitution causing your melody to anticipate the A♭ major sound. Example: Dm7 G7 Cmaj7 being played as Dm7 E♭7 A♭.
Also possible is that your piece isn't simply playing the A♭ major chord but rather is modulating, in which case a strange melody could end up making a lot of sense.
Maybe some really convoluted secondary dominants? [tonicizing a chord besides the I (or i) with its dominant chord]
Also possible is Polytonality, playing in two keys at once (though it's incredibly rare and highly chaotic at times, so I doubt this is it)...
Modal mixture is another possibility, borrowing notes from a parallel mode or scale.
Edit: It sounds like you are simply anticipating the (non-diatonic) chord with the melody. This is similar about what I said about tritone substitution, but just with any non-diatonic chord being anticipated by the melody. Thanks to Creynders in the comments for the insight.