In Chapter 2 of Utilitarianism, Mill says that some people will accuse utilitarianism of being a philosophy that is really just about expediency. Therefore, they will say, it has nothing to do with what is right. What this means is that people think that utilitarianism says that you can just do whatever is easiest or whatever is best for you at a given moment. Mill, however, rejects this criticism.
According to Mill, this criticism of utilitarianism is based on a poor understanding of what is expedient. Mill says that things that people say are expedient really are not. For example, he says that a person might really want to tell a lie to get themselves out of a tight spot. However, he says, this is not really what is best for that person. He says that a person who tells lies is essentially ruining his or her reputation. In the long run, this is going to be very bad for the person. No one will trust that person and that will be much worse than the predicament that the person lied to get out of. As Mill says,
…it would often be expedient, for the purpose of getting over some momentary embarrassment, or attaining some object immediately useful to ourselves or others, to tell a lie.
However, as he goes on to say,
…the cultivation in ourselves of a sensitive feeling on the subject of veracity, is one of the most useful, and the enfeeblement of that feeling one of the most hurtful, things to which our conduct can be instrumental…
What he is saying here is that telling the truth is one of the most useful things to us, and a lack of honesty is one of the things that is most hurtful to us.
So, what Mill is saying is that utilitarianism does not approve of actions that people would typically call expedient. These actions really only seem to help people but, in the long term, they are harmful. Because they are harmful, utilitarians would not approve of them. Utilitarianism, then, is not a doctrine that approves of things that are merely done from what the world calls expediency.