Yes, you can hardwire your disposer although you may wish to install an outlet instead. If you wish to hard wire the disposer, simply cut off the power plug and strip the wires. You will need to, of course, turn off the main power to the junction box holding the old wire. Open the junction box and remove the wire nuts or electrical tape or whatever is tying the old disposer wire to the electrical wire inside of the junction box. Insert the new disposer wire with the stripped ends. Tie them to the electrical wire, using wire nuts or electrical tape. Close the junction box cover.
Of course, if you install the outlet instead, you will not have to cut off the plug nor strip the wires. Another advantage of installing an outlet is that, if there enough voltage to the junction box you could install a two gang outlet. You would then wind up with an extra outlet for use with such appliances as hot water dispenser, trash compactor, etc. One more advantage is that it would be easy to remove the disposer if, for whatever reason, you needed to do so.
Disclaimer: these suggestions are assuming that you have knowledge of connecting electrical wires safely. If there is any doubt, please contact a qualified electrician.
Posted in: Disposer Installation