With the development of technologies such as the Internet of Things and artificial intelligence, mobile applications are becoming more and more intelligent. Compared to traditional applications realized by mobile cloud computing technology, these novel applications have a higher requirement for a task offloading scheme. However, the traditional task offloading schemes are hard pressed to meet latency and personalization requirements of these new applications. For intelligent application, how to realize personalized and fine-grained task offloading is still a challenging problem. Therefore, we propose a scheme called intelligent task offloading (iTaskOffloading) for a cloud-edge collaborative system, which can provide personalized task offloading. To be specific, we first propose the architecture of iTaskOffloading which includes the local device layer, edge cloud layer, remote cloud layer, and cognitive engine. Then we analyze the method of iTaskOffloading, which contains coarse-grained computing and fine-grained computing. Finally, we build a testbed to evaluate the proposed iTaskOffloading scheme using a typical intelligent application of emotion detection. The experimental results show that compared to the traditional cloud computing scheme, iTaskOffloading has less task duration.