A task handoff method includes: displaying a target task, where the target task is a task that is running in a foreground and can be handed off on a first device; and in response to detection that a device at which a target user is gazing is switched from the first device to a second device, handing off the target task from the first device to the second device, so as to display the target task on the second device; where the first device is associated with at least one third device, and the second device is any one of the at least one third device.