I would like to install an in-wall remote control for a ceiling fan. The remote is wired up with two black wires (in and out) and a ground wire. It controls the fan's functions via wireless signal. Unfortunately, the metal box in which I would like to install the remote is ungrounded and the remote needs a ground connection to work. Can I safely connect the remote's ground wire to neutral to make it work?
You cannot, for any reason, connect a grounding conductor to a neutral (grounded) conductor anywhere other than in the service equipment.
If you do so, the metal box and any metal connected to the box (including the fan housing) will become a current carrying conductor. This is very bad, and can result in personal injury and/or death.
I doubt the remote requires the grounding conductor to be connected in order to function.
The device's grounding conductor is a safety feature, and should be left unconnected when installing the device in an ungrounded box where there is no separate grounding wire in the feed cable. However, you'll want to be sure the box is not grounded. Just because there's not a grounding wire in the box, does not mean the box is not grounded. The box could be grounded via conduit, the outer sheath of the cable feeding the box, or some other method.
Many multi speed ceiling fan motors will have a ground wire inside of the housing that simply attaches to a sheet metal screw on an internal part of the housing. Because this is fairly common, when adding remote circuits or dimmable lighting that also has a ground lead, most often the instructions will say to connect the ground lead to the housing also.
I presume that this advice is likely because in many buildings metal circuit conduit is used as ground, which would be in contact to the metal mounts and housings of most fixtures. In ceiling fans and related fixtures and add-ons, because many will have either a vibration bushing or non-conductive ball joint, a wire would need to connect the ground from one part of the housing to the next.