xmakefirstuc combined with MakeTextLowercase

\xmakefirstuc{\MakeTextLowercase{\mylong}}

is a shortcut for

\expandafter\makefirstuc\expandafter{\MakeTextLowercase{\mylong}}

which attempts to expand \MakeTextLowercase{\mylong}. Since \MakeTextLowercase is robust, no expansion is performed. The TeX primitive \lowercase also doesn't expand, so trying to expand to lowercase and then applying \makefirstuc won't work. However, it will work if you first expand \mylong. Like this:

\expandafter\makefirstuc\expandafter{\expandafter\MakeTextLowercase\expandafter{\mylong}}

Or using \xmakefirstuc:

\xmakefirstuc{\expandafter\MakeTextLowercase\expandafter{\mylong}}

Here's the MWE:

% arara: pdflatex
\documentclass{book}
\usepackage{xstring}
\usepackage{textcase}
\usepackage{mfirstuc}
\newcommand{\howtodothis}[1]{%
    \StrSubstitute{#1}{ }{-}[\mylong]%
    \xmakefirstuc{\expandafter\MakeTextLowercase\expandafter{\mylong}}%
}
\begin{document}\noindent%
\howtodothis{First Letter Should Be Uppercase, All Others Lowercase.}
\end{document}

This is the result:

First-letter-should-be-uppercase-all-others-lowercase

Edit: This is actually equivalent to:

\MakeTextLowercase{\MakeUppercase{F}irst-Letter-Should-Be-Uppercase,-All-Others-Lowercase.}

This may seem a bit contradictory as logic suggests that the \MakeTextLowercase should counteract the \MakeUppercase, but this is a result of the way that TeX processes tokens (see @egreg's comment below). You can see this from:

\lowercase{\uppercase{f}}

which produces an uppercase F.


Case changing use TeX primitives is not expandable, which is why trying to 'force the issue' isn't easy to get right here. Nicola has shown how to handle this using mfirstuc. A 'classical' approach to the same issue is to split the first token off from all of the rest, for example

\documentclass{book}
\usepackage{xstring}
\usepackage{textcase}
\newcommand\howtodothis[1]{%
  \howtodothisaux#1\stop
}
\newcommand\howtodothisaux{}
\long\def\howtodothisaux#1#2\stop{%
  \MakeTextUppercase{#1}%
  \MakeTextLowercase{#2}%
}
\begin{document}\noindent%
\howtodothis{First Letter Should Be Uppercase, All Others Lowercase.}
\end{document}

With an up-to-date expl3, you can do this using the expandable \text_titlecase:n function and no need to split the input:

\documentclass{book}
\usepackage{expl3}
\ExplSyntaxOn
\newcommand{\howtodothis}[1]{%
  \text_titlecase:n {#1}%
}
\ExplSyntaxOff
\begin{document}\noindent%
\howtodothis{First Letter Should Be Uppercase, All Others Lowercase.}
\end{document}