I recommend 'The Emperor and His Concubine Can't Do It'. This book fits the information you provided. The male protagonist was the emperor of the Kingdom of Women. He disguised himself as a woman and let the female protagonist be his concubine. The female protagonist disguised herself as a man. Not only were there palace struggles and terrible harem life, but there were also hilarious plots and romantic love lines. I hope you like my recommendation.