Let c be a vertex k-coloring on a connected graph G(V,E). Let Π= {C1,C2, …, Ck} be the partition of V(G) induced by the coloring c. The color code cΠ(v) of a vertex v in G is (d(v, C1), d(v,C2), …, d(v,Ck)), where d(v,Ci) = min{d(v,x)|x ∊ Ci} for 1 ≤ i ≤ k. If any two distinct vertices u,v in G satisfy that cΠ(u) ≠ cΠ(v), then c is called a locating k-coloring of G. The locating-chromatic number of G, denoted by χ,L(G), is the smallest k such that G admits a locating k-coloring. Let T(n,k) be a complete n-ary tree, namely a rooted tree with depth k in which each vertex has n children except for its leaves. In this paper, we study the locating-chromatic number of T(n,k).