Porting MikroC code to MPLAB for PIC16F1508 adding extra noise to ADC
This is a good illustration of the trouble you run into when using canned libraries.

If you originally had 10% noise on the signal, then maybe the problem is with the circuit.  What kind of signal are you measuring?  What is its upper frequency?  How often are you sampling?  It would be useful to show the schematic.

You seem to be allowing 5 &micro;s for acquisition, but how do you know that is enough?  What impedance is the signal being fed to the A/D?  One possible explanation of your symptoms is that the signal impedance is too high, and the previous code used a longer acquisition time, which allowed the sample and hold to settle more closely to the correct value.

However, a better answer is probably to re-think the whole A/D strategy in the first place.  Don't base it on what library routines happen to be available or some similar nonsense.  Read the datasheet section on the A/D and think about how best to use it, possibly in conjunction with other hardware, like timers, to solve the overall measurement problem.

A strategy I often use is to take A/D readings in a periodic interrupt.  You run this as fast as the A/D will let you acquire and convert the signal, and within limits of leaving enough foreground cycles for the rest of the system.  This A/D interrupt samples the A/D much faster than you really need, then low pass filters the results.  When the main code wants the latest reading, it doesn't go out and take a single A/D reading.  It just uses the current value of the low pass filter output.  I have done this sort of thing many times.  In fact, it's my normal way to take A/D readings unless there is a specific reason to do it differently.

In a small microcontroller, there is no substitute for actually understanding the hardware and being aware of how exactly it is being used, whether it is thru your own code or "library" routines.

Added about periodic A/D interrupts

You now say you are using periodic interrupts to read the A/D, but then your code makes even less sense than it did before.  If you are only reading a single channel, then you'd leave the A/D set to that channel and not change it during normal operation.  If you are reading multiple channels, the interrupt would cycle thru them.  In that case, the A/D conversion done interrupt would switch the hardware to the new channel right after grabbing the conversion results.  That way most of the time that isn't conversion is used to acquire the next signal.  Even if you were to run the A/D quite fast, like 100 kHz for example, that still leaves most of 10 &micro;s for the acquisition.

You wouldn't generally call a A/D conversion routine from a interrupt anyway, and even if you did, it wouldn't be changing the channel and then waiting around for the acquisition and conversion while the foreground code is locked out of the processor.  That makes no sense and is unnecessary.

Then there is the issue of returning the unsigned 10 bit value left justified into a signed integer.  It makes no sense that values of 512 and above should be interpreted as negative.

Once again, what is the upper frequency content of the signal?  How often does the firmware need its value?  I ask these questions for good reasons, and I expect you to answer them whether you think they are relevant or understand the reasons or not.  After all, this is your problem.  We are volunteers trying to help, but if you refuse to cooperate then we will find other places to spend our limited time here.