Assuming cross-entropy loss (as you specified in the comment), it can happens.
The reason is that the loss in cross-entropy is "activated" only for the probability of the ground truth (t_i is 1 for the ground truth and 0 otherwise).
Imagine a classification task with five classes, with the two following probability situations:
(a) 0.4 0.5 0.04 0.03 0.03
(b) 0.3 0.2 0.2 0.15 0.15
Assume that the true label is the first class.
In situation (a) the predicted class is the second one, but the probability of the first class (which is the only one which matters) is 0.4.
In situation (b) the predicted class is the first one (so the right one), but the probability of the first class is less than the situation (a).
Since cross-entropy cares only of the probability of the true label, in the first case you will obtain a lower loss because the probability is higher, even if the predicted class is the wrong one.
This phenomenon is more probable as the number of classes grows. For few classes, this is highly improbable or even impossible (think to the binary classification case, where this can't happen).
Cheers