A growing number of microbial reference genomes enable better metagenomic profiling accuracy yet put higher requirements on the indexing efficiency, database size, and runtime of taxonomic profilers. Besides, most profilers focused mainly on bacterial, archaeal, and fungal populations with less attention on viral communities. We present KMCP, a novel k-mer based metagenomic profiling tool that introduces genomic positions to k-mers by splitting the reference genomes into chunks. Benchmarking results on both simulated and real data demonstrate that KMCP not only allows for accurate taxonomic profiling of archaea, bacteria, and viral populations from metagenomic shotgun sequence data, but also provides confident pathogen detection for infectious clinical samples of low depth. KMCP is implemented in Go and is available as open-source software, under MIT, at https://github.com/shenwei356/kmcp.