Online social networks being extended to geographical space has resulted in large amount of user check-in data. Understanding check-ins can help to build appealing applications, such as location recommendation. In this paper, we propose DeepCity, a feature learning framework based on deep learning, to profile users and locations, with respect to user demographic and location category prediction. Both of the predictions are essential for social network companies to increase user engagement. The key contribution of DeepCity is the proposal of task-specific random walk which uses the location and user properties to guide the feature learning to be specific to each prediction task. Experiments conducted on 42M check-ins in three cities collected from Instagram have shown that DeepCity achieves a superior performance and outperforms other baseline models significantly.