For large collections of gallery images captured by sparsely distributed cameras, we often employ hashing based approaches to enhance the efficiency of person re-identification (re-id). However, these hashing based approaches fail to provide semantically explainable encoding in solving the re-id problem, which makes it infeasible to identify the correct matches in the collection by just using a semantic query. To overcome this limitation, we propose a new deep hashing network called Deep Semantic Structured Hashing (DeepSSH) to obtain the semantic structured representation of human. In the proposed DeepSSH framework, both the mid-level human attributes and the high-level ID labels are used to learn a deep hashing network. Then, based on the obtained semantic structured hash code and the attribute labels, we learn a decoder to find the partial hash code corresponding to the specified attributes. Finally, a new grain scalable re-id framework is constructed to support semantic query of a person by providing partial or full semantic description of a person instead of the whole photo. Experimental results show that DeepSSH is comparable with state-of-the-art hashing-based person re-id approaches, and the experiment in semantic analysis shows that our hash code owns semantic meaning indeed.